Last active
July 14, 2016 20:26
-
-
Save Krasnyanskiy/06e0e91bc2007ab9adda4b4a942ac961 to your computer and use it in GitHub Desktop.
-scala: return type A with B
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
trait B | |
trait A { | |
def bar: Boolean | |
} | |
def foo: A with B = new A with B { | |
def bar: Boolean = true | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment