v2: reset expr_mod after struct_init type is parsed

pull/3929/head
Joe Conigliaro 2020-03-04 00:24:15 +11:00
parent 90996269fd
commit af3159791f
1 changed files with 1 additions and 0 deletions

View File

@ -513,6 +513,7 @@ pub fn (p mut Parser) parse_ident(is_c bool) ast.Ident {
fn (p mut Parser) struct_init() ast.StructInit {
typ := p.parse_type()
p.expr_mod = ''
sym := p.table.get_type_symbol(typ)
// p.warn('struct init typ=$sym.name')
p.check(.lcbr)