mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
13 lines
167 B
V
13 lines
167 B
V
fn test_or_expr_with_multi_stmts() {
|
|
x := fmt_test() or {
|
|
println(err.msg())
|
|
-100
|
|
}
|
|
println(x)
|
|
assert x == -100
|
|
}
|
|
|
|
fn fmt_test() ?int {
|
|
return error('foo')
|
|
}
|