mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
17 lines
157 B
V
17 lines
157 B
V
fn test1() ?int {
|
|
a := 3
|
|
return a
|
|
}
|
|
|
|
fn test2() ?int {
|
|
mut a := 0
|
|
defer {
|
|
a = test1()?
|
|
}
|
|
return a
|
|
|
|
fn main() {
|
|
x := test2() or { -1 }
|
|
println(x)
|
|
}
|