mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
15 lines
113 B
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
|
|
}
|