Last active
August 29, 2015 14:03
-
-
Save notyy/2d7c59ecd758017af1ca to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| package diamondProblem | |
| trait A{ | |
| def hello() = println("hello from A") | |
| } | |
| trait B extends A{ | |
| override def hello() = println("hello from B") | |
| } | |
| trait C extends A { | |
| override def hello() = println("hello from C") | |
| } | |
| object D extends B with C | |
| scala> D.hello() | |
| hello from C |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment