ast: minor cleanup in generic_struct_insts_to_concrete() (#9855)

pull/9862/head
yuyi 2021-04-23 22:21:16 +08:00 committed by GitHub
parent af8ef12990
commit b2dc444dd2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 2 deletions

View File

@ -1055,8 +1055,7 @@ pub fn (mut t Table) resolve_generic_to_concrete(generic_type Type, generic_name
// generic struct instantiations to concrete types
pub fn (mut t Table) generic_struct_insts_to_concrete() {
for idx, _ in t.type_symbols {
mut typ := unsafe { &t.type_symbols[idx] }
for mut typ in t.type_symbols {
if typ.kind == .generic_struct_inst {
info := typ.info as GenericStructInst
parent := t.type_symbols[info.parent_idx]