Skip to content

Instantly share code, notes, and snippets.

@lutzh
Created October 20, 2015 08:20
Show Gist options
  • Save lutzh/dd9b53626abc517d4145 to your computer and use it in GitHub Desktop.
Save lutzh/dd9b53626abc517d4145 to your computer and use it in GitHub Desktop.
trait A {
def action() = println("a")
}
trait B extends A {
override def action() = println("b")
}
trait C {
def action() = println("c")
}
trait D {
def action() = println("d")
}
class E extends B with C with D {
override def action = super.action()
}
class F extends B with C with A {
override def action = super.action()
}
@lutzh
Copy link
Author

lutzh commented Oct 20, 2015

Quiz for FTTS students..
What's the result of (new E).action?
What's the result of (new F).action?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment