New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compiler crash with scala.tools.nsc.symtab.Types$$TypeError #3714
Comments
Imported From: https://issues.scala-lang.org/browse/SI-3714?orig=1 |
@lrytz said: |
@paulp said: class A {
def f(x: Any) = x match {
case BreakImpl(z) => z
}
}
case class BreakImpl(private val break: Int)
object Test {
def main(args: Array[String]): Unit = {
println(new A f BreakImpl(55))
}
}
% scala Test
55 |
@paulp said: |
@odersky said: |
@paulp said:
SOOOOOOOOOOOOOOOOOOLD. Always wanted! |
@paulp said:
OK, so it quickly became clear this was going to make for interesting times. Let's start with this little fellow, because either he nixes the whole deal or the theory will need a few refinements. final case class ::[B](private var hd: B, private[scala] var tl: List[B]) extends List[B] |
@paulp said: |
@paulp said: |
@cunei said: |
@odersky said: |
Given this code:
the compiler crashes with:
Defining the same classes and executing the code using the REPL succeeds. Changing the implementation of BreakImpl to
also seems to compile correctly.
All of this was tested on Scala 2.8.0.final.
The text was updated successfully, but these errors were encountered: