Aladdin - Scala Bugtracking
[#560] project: compiler priority: high category: bug
submitter assigned to status date submitted
Burak Burak fixed 2006-03-30 15:05:29.0
subject right-ignoring patterns crash compiler
code
object foo { // crashes with scalav2.1.1
  import scala.xml._;

  def foo() = 
    <a/> match {
      case Elem(_,_,_,_,Text("1"),_*) =>
        Console.println("cool!")
      case _ =>
        Console.println("bah")
    }
}
what happened
Exception in thread "main" java.lang.Error: unit = regmatch.scala; tree = (_)*
        at scala.Predef$.error(Predef.scala:155)
        at scala.tools.nsc.matching.PatternMatchers$PatternMatcher.patternNode(PatternMatchers.scala:394)

...
what expected

silent compile, correct match.

I could quickly fix this bug, but include it here for documentation

[back to overview]
Changes of this bug report