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

2 Commits

Author SHA1 Message Date
Daniel Däschle
0024ff848d
parser: check if the last or {} block expression is valid
These checks allows for:

a) `x := call() or { 'abc' }`
b) `x := call() or { panic('abc') }`
c) `x := call() or { exit(123) }`
d) `x := call() or { continue }`
e) `x := call() or { break }`
f) `x := call() or { return }`

... but produce errors for:

g) `x := call() or { println('an error') }` , etc.
2020-04-07 17:36:00 +03:00
Alexander Medvednikov
eed7c91e87 move compiler tests from compiler/ to v/ 2020-03-27 18:01:46 +01:00