Files
wren/test/language/super/closure.wren
T
Bob Nystrom 64eccdd9be Reorganize tests and benchmark scripts.
Mainly to get rid of one top level directory. But this will
also be useful when there are tests of the embedding API.
2015-03-14 12:45:56 -07:00

12 lines
213 B
Plaintext

class Base {
toString { "Base" }
}
class Derived is Base {
getClosure { new Fn { super.toString } }
toString { "Derived" }
}
var closure = (new Derived).getClosure
IO.print(closure.call()) // expect: Base