Aladdin - Scala Bugtracking
[#128] project: compiler priority: medium category: bug
submitter assigned to status date submitted
Martin Burak fixed 2003-09-11 12:53:35.0
subject pattern parsing too liberal
code
class Test {

  val x | 1 = 2;

}
what happened
Exception in thread "main" scalac.ApplicationError: cannot handle (x | 1)
	at scalac.transformer.matching.AlgebraicMatcher.patternNode(AlgebraicMatcher.java:225)
	at scalac.transformer.matching.AlgebraicMatcher.enter1(AlgebraicMatcher.java:320)
	at scalac.transformer.matching.AlgebraicMatcher.addCase(AlgebraicMatcher.java:122)
	at scalac.transformer.matching.AlgebraicMatcher.addCase(AlgebraicMatcher.java:112)
	at scalac.transformer.matching.AlgebraicMatcher.construct(AlgebraicMatcher.java:57)
	at scalac.transformer.matching.AlgebraicMatcher.construct(AlgebraicMatcher.java:46)
	at scalac.transformer.TransMatch.transform(TransMatch.java:103)
	at scalac.transformer.TransMatch.transform(TransMatch.java:125)
	at scalac.transformer.OwnerTransformer.transform(OwnerTransformer.java:41)
	at scalac.transformer.OwnerTransformer.transform(OwnerTransformer.java:125)
	at scalac.transformer.TransMatch.transform(TransMatch.java:136)
	at scalac.transformer.OwnerTransformer.transform(OwnerTransformer.java:41)
	at scalac.transformer.OwnerTransformer.transformTemplateStat(OwnerTransformer.java:87)
	at scalac.transformer.OwnerTransformer.transformTemplateStats(OwnerTransformer.java:76)
	at scalac.transformer.OwnerTransformer.transform(OwnerTransformer.java:68)
	at scalac.transformer.OwnerTransformer.transform(OwnerTransformer.java:100)
	at scalac.transformer.TransMatch.transform(TransMatch.java:136)
	at scalac.ast.Transformer.transform(Transformer.java:276)
	at scalac.transformer.OwnerTransformer.apply(OwnerTransformer.java:35)
	at scalac.transformer.TransMatch.apply(TransMatch.java:92)
	at scalac.transformer.TransMatchPhase.apply(TransMatchPhase.java:33)
	at scalac.Global.compile(Global.java:293)
	at scalac.Global.compile(Global.java:266)
	at scalac.Main.main(Main.java:32)
what expected A parse error
[back to overview]
Changes of this bug report
Burak  edited on  2003-09-12 15:30:32.0
says this now:
Test.scala:3: variable not allowed under alternative
    val x | 1 = 2;