From b930a1120366cfe35ddc3b456c2bc6120d1327a5 Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Mon, 22 Jun 2020 16:16:33 +0300 Subject: [PATCH] parser: fix `match x { mod.constname {} }` handling --- vlib/v/parser/if.v | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vlib/v/parser/if.v b/vlib/v/parser/if.v index ceee463488..fdbaeb3ce7 100644 --- a/vlib/v/parser/if.v +++ b/vlib/v/parser/if.v @@ -118,7 +118,7 @@ fn (mut p Parser) match_expr() ast.MatchExpr { p.next() } else if p.tok.kind == .name && !(p.tok.lit == 'C' && p.peek_tok.kind == .dot) && (p.tok.lit in table.builtin_type_names || (p.tok.lit[0].is_capital() && !p.tok.lit.is_upper()) || - p.peek_tok.kind == .dot) { + (p.peek_tok.kind == .dot && p.peek_tok2.lit[0].is_capital() ) ) { if var_name.len == 0 { match cond { ast.Ident {