Skip to content

Instantly share code, notes, and snippets.

@jvican
Created January 31, 2017 17:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jvican/6a00267b7e04cbcd056355b56ac1f0d3 to your computer and use it in GitHub Desktop.
Save jvican/6a00267b7e04cbcd056355b56ac1f0d3 to your computer and use it in GitHub Desktop.
// 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