1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

parser: remove unnecessary match as code (#6972)

This commit is contained in:
Daniel Däschle 2020-11-27 21:25:08 +01:00 committed by GitHub
parent 04ecc4737c
commit 18cf36a22c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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()