Created
January 31, 2017 17:46
-
-
Save jvican/6a00267b7e04cbcd056355b56ac1f0d3 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
// A.scala | |
abstract class A { | |
type T <: S | |
type S | |
object X { | |
def foo: T = null.asInstanceOf[T] | |
} | |
} | |
// B.scala | |
class B extends A { | |
type S <: Int | |
} | |
// C.scala | |
object C extends B | |
// D.scala | |
object D { | |
val x: Int = C.X.foo | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment