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

15 lines
175 B
V

struct MyError {
code int
msg string
}
fn foo() int | none | IError {
return IError(MyError{})
}
fn test_string_optional_none() {
x := foo()
println(x)
assert true
}