Aladdin - Scala Bugtracking
[#418] project: compiler priority: low category: bug
submitter assigned to status date submitted
Philippe Martin fixed 2005-04-12 14:19:58.0
subject unknown constructors in pattern crash the analyzer
code
object Test {
  null match { case Foo.Bar(x) => x }
}
what happened
tmp/test.scala:2: not found: value Foo

  null match { case Foo.Bar(x) => x }
                    ^
Exception in thread "main" java.lang.AssertionError: <any type>
	at scalac.symtab.Type.elimRedundant(Type.java:2797)
	at scalac.symtab.Type.lub0(Type.java:2868)
	at scalac.symtab.Type.lub(Type.java:2834)
	at scala.tools.scalac.typechecker.Analyzer$class.transformVisitor(Analyzer.scala:1813)
	at scala.tools.scalac.typechecker.Analyzer$$anon$21.scala$tools$scalac$typechecker$Analyzer$$anon$21$handleAppl\
y$0(Analyzer.scala:2754)
	at scala.tools.scalac.typechecker.Analyzer$$anon$21.apply(Analyzer.scala:2857)
	at scala.tools.scalac.typechecker.Analyzer$$anon$21.apply(Analyzer.scala:2160)
	at scala.runtime.ScalaRunTime$$anon$0.run(ScalaRunTime.scala:24)
	at scala.runtime.RunTime.tryCatch(RunTime.java:79)
	at scala.runtime.ScalaRunTime$$anon$0.<init>(ScalaRunTime.scala:22)
	at scala.runtime.ScalaRunTime$.Try(ScalaRunTime.scala:20)
	at scala.tools.scalac.typechecker.Analyzer$class.transform(Analyzer.scala:2159)
	at scala.tools.scalac.typechecker.Analyzer$class.transform(Analyzer.scala:2084)
	at scala.tools.scalac.typechecker.Analyzer$class.transform(Analyzer.scala:2097)
	at scala.tools.scalac.typechecker.Analyzer$class.transformStatSeq(Analyzer.scala:1847)
	at scala.tools.scalac.typechecker.Analyzer$class.transformTemplate(Analyzer.scala:1930)
	at scala.tools.scalac.typechecker.Analyzer$$anon$21.apply(Analyzer.scala:2244)
	at scala.tools.scalac.typechecker.Analyzer$$anon$21.apply(Analyzer.scala:2160)
	at scala.runtime.ScalaRunTime$$anon$0.run(ScalaRunTime.scala:24)
	at scala.runtime.RunTime.tryCatch(RunTime.java:79)
	at scala.runtime.ScalaRunTime$$anon$0.<init>(ScalaRunTime.scala:22)
	at scala.runtime.ScalaRunTime$.Try(ScalaRunTime.scala:20)
	at scala.tools.scalac.typechecker.Analyzer$class.transform(Analyzer.scala:2159)
	at scala.tools.scalac.typechecker.Analyzer$class.transform(Analyzer.scala:2101)
	at scala.tools.scalac.typechecker.Analyzer$class.transformStatSeq(Analyzer.scala:1850)
	at scala.tools.scalac.typechecker.Analyzer$class.apply(Analyzer.scala:105)
	at scala.tools.scalac.typechecker.AnalyzerPhase$class.apply(AnalyzerPhase.scala:80)
	at scalac.CompilationLoop.loop(CompilationLoop.java:102)
	at scalac.CompilationLoop.compile(CompilationLoop.java:60)
	at scalac.Global.compile(Global.java:390)
	at scalac.Global.compile(Global.java:365)
	at scala.tools.scalac.Main$.main1(Main.scala:47)
	at scala.tools.scalac.Main$.main(Main.scala:28)
	at scala.tools.scalac.Main.main(Main.scala:28)
what expected no compiler crash
[back to overview]
Changes of this bug report
Philippe  edited on  2005-04-12 14:21:01.0
Fixed "what happened"
Martin  edited on  2006-03-30 17:51:45.0