Skip to content

Instantly share code, notes, and snippets.

@Krasnyanskiy
Last active July 14, 2016 20:26
Show Gist options
  • Save Krasnyanskiy/06e0e91bc2007ab9adda4b4a942ac961 to your computer and use it in GitHub Desktop.
Save Krasnyanskiy/06e0e91bc2007ab9adda4b4a942ac961 to your computer and use it in GitHub Desktop.
-scala: return type A with B
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