Aladdin - Scala Bugtracking
[#647] project: compiler priority: low category: bug
submitter assigned to status date submitted
Nikolay Burak fixed 2006-06-30 11:27:10.0
subject [contrib #163] _* doesn't match zero elements
code
object Test
{
        case class X(a : String, b : String, r : String*)
        def main(argv : Array[String]) = {
                X("1", "2") match {
                        case X("1", "2", r @ _*) =>
                                Console.println(r)
                }
        }
}
what happened
At runtime:

Exception in thread "main" scala.MatchError: X(1,2,Array())
        at Test$.main(test.scala:5)
        at Test.main(test.scala)
what expected Prints List()
[back to overview]
Changes of this bug report
Nikolay  edited on  2006-06-30 11:28:08.0
Transferred from the contributions and assigned to Burak
Burak  edited on  2006-07-12 12:53:23.0
works now. actually, it will print Array()