Aladdin - Scala Bugtracking
[#1031] project: compiler priority: high category: bug
submitter assigned to status date submitted
Stephane Martin fixed 2007-03-30 19:20:38.0
subject NoSuchElementException: head of empty list
code
abstract class Tree
case class Foo(xs: List[Int]) extends Tree

object test extends Application {
  Foo(Nil) match {
    case Foo(xs: List[_]) =>
      Console.println(xs)
    case _ =>
      ;
  }
}
what happened
exception when transforming java.lang.Object with scala.Application with scala.ScalaObject {
  def this(): object test = {
    test.super.this();
    ()
  };
[...]
what expected prints "List()"
[back to overview]
Changes of this bug report
Stephane  edited on  2007-03-30 19:21:21.0
Also broken in 2.4.0-final
Stephane  edited on  2007-04-10 13:34:41.0
fixed (rev 10652?)