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

parser: bring back "evaluated but not used"

This commit is contained in:
Alexander Medvednikov 2020-05-12 00:19:45 +02:00
parent 1c8e14c77c
commit 27d3800cc3

View File

@ -487,7 +487,7 @@ pub fn (mut p Parser) stmt() ast.Stmt {
p.error_with_pos('unexpected name `$p.peek_tok.lit`', p.peek_tok.position())
} else if p.tok.kind == .name && !p.inside_if_expr && !p.inside_match && !p.inside_or_expr &&
p.peek_tok.kind in [.rcbr, .eof] {
// p.error_with_pos('`$p.tok.lit` evaluated but not used', p.tok.position())
p.error_with_pos('`$p.tok.lit` evaluated but not used', p.tok.position())
}
epos := p.tok.position()
expr := p.expr(0)