The following code compiles under Scala-2.8.1.final but causes the compiler to crash under Scala-2.9.0.RC4. ```scala package mypkg { trait M { type C <: M } trait F extends M { type C = F } // requires private[mypkg] to reproduce private[mypkg] abstract class Private[E <: M] { type Sub <: Private[E#C] final val sub: Sub = null.asInstanceOf[Sub] def foo: E } trait Public[E <: M] extends Private[E] { type Sub = Public[E#C] } } import mypkg._ object Test { val seq = null.asInstanceOf[Public[F]] seq.sub.foo } ``` The only workaround I can think of is to strip all the package private modifiers. Of course that would expose internal implementation as public API. === Versions === - Scala: 2.9.0.RC4 - Java: 1.6.0_u24 - Operating system: GNU/Linux 2.6.38