2013-12-13 16:37:49 +00:00
|
|
|
class Base {
|
|
|
|
|
foo {
|
2015-09-15 14:46:09 +00:00
|
|
|
System.print("Base.foo")
|
2013-12-13 16:37:49 +00:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
class Derived is Base {
|
2015-09-01 15:16:04 +00:00
|
|
|
construct new() {}
|
|
|
|
|
|
2013-12-13 16:37:49 +00:00
|
|
|
foo {
|
2015-09-15 14:46:09 +00:00
|
|
|
System.print("Derived.foo")
|
2013-12-13 16:37:49 +00:00
|
|
|
super.foo
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2015-07-10 16:18:22 +00:00
|
|
|
Derived.new().foo
|
2013-12-13 16:37:49 +00:00
|
|
|
// expect: Derived.foo
|
|
|
|
|
// expect: Base.foo
|