Aladdin - Scala Bugtracking
[#221] project: compiler priority: high category: bug
submitter assigned to status date submitted
Burak _ not repro 2003-11-07 12:49:05.0
subject named constant - patterns
code
object foo {
  val A = 1;
  def foo = 2.match {
    case A => true
  }
}
what happened
the  match will succeed. uncurry turns references to vals into access method calls (Apply nodes), but both patte\
rn matchers assume that apply nodes are exclusively used for case class constructors.
what expected both pattern matchers to deal with apply nodes that are not constructors, but value references.
[back to overview]
Changes of this bug report
Martin  edited on  2004-01-15 17:10:24.0