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

use get_type2 in struct.v

This commit is contained in:
Alexander Medvednikov
2019-12-05 19:02:33 +03:00
parent cca650c655
commit 79b26b1654
3 changed files with 16 additions and 4 deletions

View File

@@ -740,7 +740,7 @@ fn (p mut Parser) type_decl() {
if p.tok == .key_struct {
p.error('use `struct $name {` instead of `type $name struct {`')
}
parent := p.get_type3()
parent := p.get_type2()
nt_pair := p.table.cgen_name_type_pair(name, parent.name)
// TODO dirty C typedef hacks for DOOM
// Unknown type probably means it's a struct, and it's used before the struct is defined,