parser: multiple names error
parent
de272654f1
commit
b21be7f670
|
@ -0,0 +1,5 @@
|
|||
vlib/v/checker/tests/multi_names_err.v:2:4: error: unexpected name `a`
|
||||
1 | fn main() {
|
||||
2 | a a a a := 1
|
||||
| ^
|
||||
3 | }
|
|
@ -0,0 +1,3 @@
|
|||
fn main() {
|
||||
a a a a := 1
|
||||
}
|
|
@ -472,6 +472,8 @@ pub fn (mut p Parser) stmt() ast.Stmt {
|
|||
return ast.GotoLabel{
|
||||
name: name
|
||||
}
|
||||
} else if p.tok.kind == .name && p.peek_tok.kind == .name {
|
||||
p.error_with_pos('unexpected name `$p.peek_tok.lit`', p.peek_tok.position())
|
||||
}
|
||||
epos := p.tok.position()
|
||||
expr := p.expr(0)
|
||||
|
|
Loading…
Reference in New Issue