/gist:fcbc1be0d35b11d38a84 Secret
Last active
August 29, 2015 14:15
Star
You must be signed in to star a gist
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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