Skip to content

Instantly share code, notes, and snippets.

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

  • Save notyy/2d7c59ecd758017af1ca to your computer and use it in GitHub Desktop.

Select an option

Save notyy/2d7c59ecd758017af1ca to your computer and use it in GitHub Desktop.
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