Last active
September 15, 2016 08:21
-
-
Save lrytz/c6ca6f5a4eb58636b633811b6350720f to your computer and use it in GitHub Desktop.
This file contains 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
class A { | |
def f = 1 | |
} | |
trait T extends A | |
class B extends A { | |
override def f = 2 | |
} | |
class C extends B with T { | |
// according to linearization, this should select `f` in | |
def t = super.f | |
// def u = super[T].f // in 2.12 this yields "error: cannot emit super call" | |
} | |
object Test { | |
def main(args: Array[String]): Unit = { | |
// prints 2 | |
println(new C().t) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment