Files
wren/test/super/indirectly_inherited.wren
T
Bob Nystrom 8bb1a94a25 refactor: convert IO from singleton instance to static class with metaclass native methods
Replace the global `io` singleton object with a static `IO` class, moving the `write` native from the instance to the metaclass. Update all benchmark, example, and test files to use `IO.write()` instead of `io.write()`.
2013-12-22 03:25:09 +00:00

19 lines
176 B
Plaintext

class A {
foo {
IO.write("A.foo")
}
}
class B is A {}
class C is B {
foo {
IO.write("C.foo")
super.foo
}
}
(new C).foo
// expect: C.foo
// expect: A.foo