v/vlib/v/tests/mark_as_referenced_test.v

25 lines
299 B
V

module main
fn test_mark_as_referenced() {
if true {
a := Type{}
ret := f(a)
println(ret)
assert ret == 'Interface(Type{})'
}
a := Type{}
ret := f(a)
println(ret)
assert ret == 'Interface(Type{})'
}
struct Type {
}
interface Interface {
}
fn f(b Interface) string {
return '$b'
}