ci: fix compilation of cmd/tools/vtest-cleancode.v

pull/10081/head
Delyan Angelov 2021-05-11 11:02:28 +03:00
parent d3de91ee86
commit 263e1ee4a4
No known key found for this signature in database
GPG Key ID: 66886C0F12D595ED
1 changed files with 3 additions and 0 deletions

View File

@ -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) mut sym := t.get_type_symbol(generic_type)
if sym.name in generic_names { if sym.name in generic_names {
index := generic_names.index(sym.name) index := generic_names.index(sym.name)
if index >= concrete_types.len {
return none
}
typ := concrete_types[index] typ := concrete_types[index]
return typ.derive(generic_type).clear_flag(.generic) return typ.derive(generic_type).clear_flag(.generic)
} else if sym.kind == .array { } else if sym.kind == .array {