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
Regression involving existential types and pattern matching #5399
Comments
Imported From: https://issues.scala-lang.org/browse/SI-5399?orig=1 |
@odersky said: |
@gkossakowski said: |
@paulp said: |
@paulp said: class Test {
type AnyCyclic = Execute[Task]#CyclicException[_]
trait Task[T]
trait Execute[A[_] <: AnyRef] {
class CyclicException[T](val caller: A[T], val target: A[T])
}
def convertCyclic(c: AnyCyclic): String =
(c.caller, c.target) match {
case (caller: Task[_], target: Task[_]) => "bazinga!"
}
} |
@paulp said: trait TFn1B {
type In
type Out
type Apply[T <: In] <: Out
}
trait TFn1[I, O] extends TFn1B {
type In = I
type Out = O
}
trait >>[F1 <: TFn1[_, _], F2 <: TFn1[_, _]] extends TFn1[F1#In, F2#Out] {
type Apply[T] = F2#Apply[F1#Apply[T]]
} |
@adriaanm said: class Test {
class A[T]
class B[T](val a: A[T])
case class CaseClass[T](x: T)
def break(existB: B[_]) =
CaseClass(existB.a) match { case CaseClass(_) => }
} |
The following code compiles without errors in 2.9.1, but fails in 2.10.0-SNAPSHOT (
2.10.0.rdev-4232-2012-01-23-g9a20086
). This looks related to Martin's fix on Jan. 21:scala/scala@2e092d4
Errors when compiled with trunk:
The text was updated successfully, but these errors were encountered: