Skip to content

Instantly share code, notes, and snippets.

@rightfold
Last active August 29, 2015 14:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rightfold/fcbc1be0d35b11d38a84 to your computer and use it in GitHub Desktop.
Save rightfold/fcbc1be0d35b11d38a84 to your computer and use it in GitHub Desktop.
class B {
underridable void f() {
println("B::f");
derived(); // calls more derived implementation of f
}
}
class D : B {
underride void f() {
println("D::f");
}
}
let x = new D();
x.f(); // calls least derived implementation of f; so prints B::f then D::f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment