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

11 lines
167 B
Go
Raw Normal View History

fn opt_err() ?string {return error('hi')}
fn test_err(){
v := opt_err() or {
assert err == 'hi'
return
}
assert false
println(v) // suppress not used error
}