mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
11 lines
167 B
Go
11 lines
167 B
Go
|
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
|
||
|
}
|