2013-12-21 23:55:08 +00:00
|
|
|
class Foo {
|
2015-09-01 15:16:04 +00:00
|
|
|
construct new() {}
|
2015-07-10 16:18:22 +00:00
|
|
|
getClosure { Fn.new { toString } }
|
2014-04-03 14:48:19 +00:00
|
|
|
toString { "Foo" }
|
2013-12-21 23:55:08 +00:00
|
|
|
}
|
|
|
|
|
|
2015-07-10 16:18:22 +00:00
|
|
|
var closure = Foo.new().getClosure
|
2015-09-15 14:46:09 +00:00
|
|
|
System.print(closure.call()) // expect: Foo
|