diff --git a/unittests/explicit_this_capture.chai b/unittests/explicit_this_capture.chai new file mode 100644 index 0000000..ca46a07 --- /dev/null +++ b/unittests/explicit_this_capture.chai @@ -0,0 +1,26 @@ +class Test +{ + def Test() + {} + + def a(Function f) + { + f("test"); +// f(); + } + + def b() + { + var l = fun [this](x) { this.thing(); } + this.a(l) + } + + def thing() + { + print("hello world"); + } +} +var t = Test() +t.b() + +