Skip to content

Commit 18cf36a

Browse files
parser: remove unnecessary match as code (#6972)
1 parent 04ecc47 commit 18cf36a

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

vlib/v/parser/pratt.v

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -247,10 +247,6 @@ pub fn (mut p Parser) expr_with_left(left ast.Expr, precedence int, is_stmt_iden
247247
node = p.index_expr(node)
248248
p.is_stmt_ident = is_stmt_ident
249249
} else if p.tok.kind == .key_as {
250-
// sum type match `match x as alias` so return early
251-
if p.inside_match {
252-
return node
253-
}
254250
// sum type as cast `x := SumType as Variant`
255251
pos := p.tok.position()
256252
p.next()

0 commit comments

Comments
 (0)