Aladdin - Scala Bugtracking
[#277] project: compiler priority: low category: bug
submitter assigned to status date submitted
Burak Burak fixed 2004-01-20 15:07:25.0
subject parse/type of sequence patterns
code
object fo {
 3 match { case (_,_) => 43 }
}
what happened
Exception in thread "main" java.lang.AssertionError: 
unit        : fii.scala
clasz       : fo
member      : fo.
owner       : fo.
tree        : temp$0.asInstanceOf[Int]().length
tree.pos    : 2:2
tree.symbol : scala.Seq.length
tree.type   : ()Int
	at scalac.checkers.TreeChecker.selection(TreeChecker.java:413)
	at scalac.checkers.TreeChecker.function(TreeChecker.java:367)
	at scalac.checkers.TreeChecker.expression(TreeChecker.java:292)
	at scalac.checkers.TreeChecker.selection(TreeChecker.java:414)
	at scalac.checkers.TreeChecker.function(TreeChecker.java:367)
	at scalac.checkers.TreeChecker.expression(TreeChecker.java:292)
	at scalac.checkers.TreeChecker.vapply(TreeChecker.java:351)
	at scalac.checkers.TreeChecker.expression(TreeChecker.java:284)
	at scalac.checkers.TreeChecker.expression(TreeChecker.java:254)
	at scalac.checkers.TreeChecker.expression(TreeChecker.java:254)
	at scalac.checkers.TreeChecker.expression(TreeChecker.java:243)
	at scalac.checkers.TreeChecker.statement(TreeChecker.java:207)
	at scalac.checkers.TreeChecker.expression(TreeChecker.java:241)
	at scalac.checkers.TreeChecker.member(TreeChecker.java:176)
	at scalac.checkers.TreeChecker.member(TreeChecker.java:143)
	at scalac.checkers.TreeChecker.template(TreeChecker.java:111)
	at scalac.checkers.TreeChecker.template(TreeChecker.java:91)
	at scalac.checkers.TreeChecker.check(TreeChecker.java:81)
	at scalac.transformer.MakeBoxingExplicitPhase.apply(MakeBoxingExplicitPh
ase.java:46)
	at scalac.Global.compile(Global.java:306)
	at scalac.Global.compile(Global.java:278)
	at scala.tools.scalac.Main$.main(sources/scala/tools/scalac/Main.scala:3
3)
	at scala.tools.scalac.Main.main(sources/scala/tools/scalac/Main.scala)
what expected either type error (because Seq[Any] does not fit to Int), or parse error.
[back to overview]
Changes of this bug report
Burak  edited on  2004-01-20 15:09:24.0
Martin  edited on  2004-01-20 15:54:40.0
Burak  edited on  2004-01-20 16:21:15.0
compiler detects the parse error now, through pattern check.

I keep this bug open until we get a straight context-free syntax for patterns (even though using CF syntax to express the various conditions might lead to a lot of duplication)

Burak  edited on  2005-06-10 18:40:19.0
probably I meant 2 change this into a specification last time, but I change it to fixed: Next time we'll update the spec, we'll start from the parser anyhow...
Burak  edited on  2005-06-10 18:40:38.0
erm, should have been "into a specification bug"