v2 / vlib / v / tests / aliases / aliased_option_fn_call_test.v
11 lines · 9 sloc · 145 bytes · 6488041a749df9762348d019c4223908c476f2e2
Raw
1type OptStr = ?string
2
3fn foo() OptStr {
4 return 'abc'
5}
6
7fn test_aliased_option_fn_call() {
8 ret := foo()?
9 println(ret)
10 assert ret == 'abc'
11}
12