class Foo { inFoo() { print "in foo"; } } class Bar < Foo { inBar() { print "in bar"; } } class Baz < Bar { inBaz() { print "in baz"; } } var baz = Baz(); baz.inFoo(); // out: in foo baz.inBar(); // out: in bar baz.inBaz(); // out: in baz