From 263e1ee4a466c100ce7406bf38ef13455a384848 Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Tue, 11 May 2021 11:02:28 +0300 Subject: [PATCH] ci: fix compilation of cmd/tools/vtest-cleancode.v --- vlib/v/ast/table.v | 3 +++ 1 file changed, 3 insertions(+) diff --git a/vlib/v/ast/table.v b/vlib/v/ast/table.v index b1aefa93ac..95f91bd247 100644 --- a/vlib/v/ast/table.v +++ b/vlib/v/ast/table.v @@ -1113,6 +1113,9 @@ pub fn (mut t Table) resolve_generic_to_concrete(generic_type Type, generic_name mut sym := t.get_type_symbol(generic_type) if sym.name in generic_names { index := generic_names.index(sym.name) + if index >= concrete_types.len { + return none + } typ := concrete_types[index] return typ.derive(generic_type).clear_flag(.generic) } else if sym.kind == .array {