Regression introduced in 2.11.9 by scala/scala#5730, sadly not fixed in 2.11.10. (2.12.2 PR: scala/scala#5816)
First compile:
trait Companion { def apply(value: String): Any = ??? }
Then, with the previously compiled trait on the classpath, compile:
object o extends Companion
case class o(value: String)
Crash:
error:
Unknown type: <error>, <error>
[class scala.reflect.internal.Types$ErrorType$, class scala.reflect.internal.Types$ErrorType$]
TypeRef? false
while compiling: o.scala
during phase: icode