Open
Description
sealed trait Op[A]
case class IntOp(i: Int) extends Op[Int]
object Test {
def run[A](op: Op[A]): Int => A = op match {
case IntOp(i) =>
{case x => i} // broken
}
// def runOkay[A](op: Op[A]): Int => A = op match {
// case IntOp(i) =>
// x => i // okay
// }
}
This no longer typechecks ("found A required Int"). I bisected the regression to http://github.com/scala/scala/pull/4971, support for SAM types.