v
v copied to clipboard
clang build error when pass variable from anon closure fn to anon closure fn
V version: OS:
What did you do?
module main
interface Test {
test(fn(Test))
}
struct Test1 {
}
fn (t Test1) test(f fn(Test)) {
f(Test(t))
}
fn main() {
t := Test1{}
t.test(fn[t](t1 Test) {
println('$t, $t1')
t.test(fn[t](t2 Test) {
println('$t, $t2')
})
})
}
https://devbits.app/play/qlB0M0vcF6LI What did you expect to see? no error
What did you see instead? error