Aladdin - Scala Bugtracking
[#961] project: compiler priority: low category: bug
submitter assigned to status date submitted
Nikolay Martin fixed 2007-02-23 14:37:43.0
subject [contrib #348] extractor object matching crashes
code
object Temp{
  abstract class A
  object B{
    private case class B_inner extends A
    def apply: A = B_inner
    def unapply(a: A) = a match {
      case B_inner() => true
      case _ => false
    }
  }
  B() match {
    case B() => Console.println("match")
  }
}
what happened
Exception in thread "main" java.lang.AssertionError: assertion failed: B() ==> T
emp.this.B.unapply()  (), pt = ?
        at scala.Predef$.assert(Predef.scala:89)
        at scala.tools.nsc.typechecker.Typers$Typer.typedApply(Typers.scala:1500
)
...the exception dump goes on...
what expected No assertion error
[back to overview]
Changes of this bug report
Nikolay  edited on  2007-02-23 14:56:32.0
contribution #348
Martin  edited on  2007-02-27 23:47:53.0