Skip to content

Instantly share code, notes, and snippets.

@michalkowol
Last active August 29, 2015 14:10
Show Gist options
  • Select an option

  • Save michalkowol/8c329a089e5b1bcdd51a to your computer and use it in GitHub Desktop.

Select an option

Save michalkowol/8c329a089e5b1bcdd51a to your computer and use it in GitHub Desktop.
trait A {
def m: String
}
trait B extends A {
override def m: String = "b"
def b = "b"
}
trait C extends A {
override def m: String = "c"
def c = "c"
}
class BC extends B with C
class CB extends C with B
new BC().m // c
new CB().m // b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment