From af3159791f3812d6c4e20a08fd24f0ff28f27e2a Mon Sep 17 00:00:00 2001 From: Joe Conigliaro Date: Wed, 4 Mar 2020 00:24:15 +1100 Subject: [PATCH] v2: reset expr_mod after struct_init type is parsed --- vlib/v/parser/parser.v | 1 + 1 file changed, 1 insertion(+) diff --git a/vlib/v/parser/parser.v b/vlib/v/parser/parser.v index 2705d5849b..9bec87b1f8 100644 --- a/vlib/v/parser/parser.v +++ b/vlib/v/parser/parser.v @@ -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)