From 18cf36a22cafc2999cb78bfc4a488a0d16be6f13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20D=C3=A4schle?= Date: Fri, 27 Nov 2020 21:25:08 +0100 Subject: [PATCH] parser: remove unnecessary match as code (#6972) --- vlib/v/parser/pratt.v | 4 ---- 1 file changed, 4 deletions(-) diff --git a/vlib/v/parser/pratt.v b/vlib/v/parser/pratt.v index a504b3f8dc..ef832dc1db 100644 --- a/vlib/v/parser/pratt.v +++ b/vlib/v/parser/pratt.v @@ -247,10 +247,6 @@ pub fn (mut p Parser) expr_with_left(left ast.Expr, precedence int, is_stmt_iden node = p.index_expr(node) p.is_stmt_ident = is_stmt_ident } else if p.tok.kind == .key_as { - // sum type match `match x as alias` so return early - if p.inside_match { - return node - } // sum type as cast `x := SumType as Variant` pos := p.tok.position() p.next()