mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
13 lines
201 B
V
13 lines
201 B
V
struct Example {
|
|
}
|
|
|
|
fn test_str_reference_struct() {
|
|
c1 := Example{}
|
|
println((&c1).str())
|
|
assert (&c1).str() == '&Example{}'
|
|
|
|
c2 := &Example{}
|
|
println(c2.str())
|
|
assert c2.str() == '&Example{}'
|
|
}
|