Add test for explicitly capturing "this"

This commit is contained in:
Jason Turner 2017-01-31 13:24:53 -08:00
parent c54d84fae6
commit 94fb7c2453

View File

@ -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()