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

15 lines
113 B
V

struct Aa {
a int
}
fn f() &Aa {
return &Aa{
a: 5
}
}
fn test_ref_return() {
x := f()
assert x.a == 5
}