* Eliminate "new" reserved word. * Allow "this" before a method definition to define a constructor. * Only create a default constructor for classes that don't define one.
19 lines
176 B
Plaintext
19 lines
176 B
Plaintext
class A {
|
|
foo {
|
|
IO.print("A.foo")
|
|
}
|
|
}
|
|
|
|
class B is A {}
|
|
|
|
class C is B {
|
|
foo {
|
|
IO.print("C.foo")
|
|
super.foo
|
|
}
|
|
}
|
|
|
|
C.new().foo
|
|
// expect: C.foo
|
|
// expect: A.foo
|