2014-01-15 07:03:24 -08:00
|
|
|
class Base {
|
|
|
|
|
foo {
|
2015-09-15 07:46:09 -07:00
|
|
|
System.print("Base.foo")
|
2014-01-15 07:03:24 -08:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
class Derived is Base {
|
2015-09-01 08:16:04 -07:00
|
|
|
construct new() {}
|
|
|
|
|
|
2014-01-15 07:03:24 -08:00
|
|
|
foo {
|
2015-09-15 07:46:09 -07:00
|
|
|
System.print("Derived.foo")
|
2014-01-15 07:03:24 -08:00
|
|
|
super
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2015-07-10 09:18:22 -07:00
|
|
|
Derived.new().foo
|
2014-01-15 07:03:24 -08:00
|
|
|
// expect: Derived.foo
|
|
|
|
|
// expect: Base.foo
|