2013-11-09 23:42:23 +00:00
|
|
|
class Foo {
|
2013-12-04 15:43:50 +00:00
|
|
|
bar { return this }
|
|
|
|
|
baz { return "baz" }
|
2013-11-09 23:42:23 +00:00
|
|
|
}
|
|
|
|
|
|
2014-01-05 20:27:12 +00:00
|
|
|
IO.print((new Foo).bar.baz) // expect: baz
|
2014-01-19 21:01:51 +00:00
|
|
|
|
|
|
|
|
// TODO: Test that "this" is the class when in a static method.
|
|
|
|
|
// (Or disallow "this" in statics? It's useful since statics are
|
|
|
|
|
// inherited.)
|