1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

parser: simplify parse_generic_struct_inst_type() (#9801)

This commit is contained in:
yuyi
2021-04-19 19:47:39 +08:00
committed by GitHub
parent 22351a6fb7
commit 3158617ce2
2 changed files with 29 additions and 6 deletions

View File

@@ -523,11 +523,6 @@ pub fn (mut p Parser) parse_generic_struct_inst_type(name string) ast.Type {
}
})
return ast.new_type(idx)
} else {
idx := p.table.find_type_idx(name)
if idx != 0 {
return ast.new_type(idx).set_flag(.generic)
}
}
return p.parse_enum_or_struct_type(name, .v)
return p.parse_enum_or_struct_type(name, .v).set_flag(.generic)
}