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

parser, checker: check assert optional (#10319)

This commit is contained in:
yuyi
2021-06-03 01:38:26 +08:00
committed by GitHub
parent 04642211b4
commit 1747e546bf
4 changed files with 13 additions and 2 deletions

View File

@@ -685,7 +685,7 @@ pub fn (mut p Parser) stmt(is_top_level bool) ast.Stmt {
pos.update_last_line(p.prev_tok.line_nr)
return ast.AssertStmt{
expr: expr
pos: pos
pos: pos.extend(p.tok.position())
is_used: p.inside_test_file || !p.pref.is_prod
}
}