mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
foo()? test
This commit is contained in:
parent
4c0269597d
commit
439bb0c5de
10
vlib/compiler/tests/repl/option.repl
Normal file
10
vlib/compiler/tests/repl/option.repl
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
fn foo() ?bool {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
fn main() {
|
||||||
|
foo()? // only works in main()
|
||||||
|
println('done')
|
||||||
|
}
|
||||||
|
===output===
|
||||||
|
done
|
Loading…
Reference in New Issue
Block a user