Aladdin - Scala Bugtracking
[#325] project: compiler priority: low category: bug
submitter assigned to status date submitted
Nikolay _ fixed 2004-04-30 17:13:21.0
subject [contrib #33] Compiler crash in MakeBoxingExplicitPhase
code
class Test {
  val foo = "foo";
  def foo(bar: String): String = bar + foo; // works
  def foo(bar: String): String = foo + bar; // crashes the compiler
}
what happened
Exception in thread "main" java.lang.AssertionError:
unit        : bug_contrib/bug_33.scala
clasz       : Test$class
member      : Test$class.foo
owner       : Test$class.foo
tree        : Test$class.this.foo().$plus
tree.pos    : 15:38
tree.symbol : java.lang.String.$plus
tree.type   : (Any)String
        at scalac.checkers.TreeChecker.selection(TreeChecker.java:396)
        at scalac.checkers.TreeChecker.function(TreeChecker.java:350)
        at scalac.checkers.TreeChecker.expression(TreeChecker.java:289)
        at scalac.checkers.TreeChecker.member(TreeChecker.java:168)
        at scalac.checkers.TreeChecker.member(TreeChecker.java:135)
        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(MakeBoxingExplicitPhase.java:46)
        at scalac.Global.compile(Global.java:380)
        at scalac.Global.compile(Global.java:351)
        at scala.tools.scalac.Main$.main1(Main.scala:35)
        at scala.tools.scalac.Main$.main(Main.scala:27)
        at scala.tools.scalac.Main.main(Main.scala:27)
what expected Flawless compilation. The def definition is simply an overloaded alternative.
[back to overview]
Changes of this bug report
Nikolay  edited on  2004-04-30 17:15:10.0
Nikolay  edited on  2006-08-16 11:01:02.0
Somehow got fixed in the 28 months since it was filed :)