1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00
v/vlib/v/tests/go_wait_with_fn_of_interface_parameter_test.v
2022-11-05 10:46:40 +03:00

18 lines
207 B
V

struct St1 {
val int = 5
}
interface In1 {
val int
}
fn test_go_wait_with_fn_of_interface_type() {
mut var := &St1{}
(spawn fn1(mut var)).wait()
}
fn fn1(mut v In1) {
println(v)
assert v.val == 5
}