mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
parser: disallow statements after a return, branch check $if, $else, switch, and loops correctly
This commit is contained in:

committed by
Alexander Medvednikov

parent
58b52aa9fb
commit
1864e92ff4
@ -19,7 +19,6 @@ fn err_call(ok bool) ?int {
|
||||
fn test_option_for_base_type_without_variable() {
|
||||
val := err_call(true) or {
|
||||
panic(err)
|
||||
return
|
||||
}
|
||||
assert val == 42
|
||||
}
|
||||
|
Reference in New Issue
Block a user