Aladdin - Scala Bugtracking
[#355] project: compiler priority: low category: bug
submitter assigned to status date submitted
Matthias Philippe fixed 2004-08-02 08:49:29.0
subject Throwing null
code
object T {
  def foo: All = throw null;
}
what happened
Compiler crash:
Exception in thread "main" java.lang.AssertionError:
unit        : T.scala
clasz       : T
member      : T.foo
owner       : T.foo
tree        : null.throw
tree.pos    : 2:24
tree.symbol : java.lang.Throwable.throw
tree.type   : ()All
        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:381)
        at scalac.Global.compile(Global.java:352)
        at scala.tools.scalac.Main$.main1(Main.scala:42)
        at scala.tools.scalac.Main$.main(Main.scala:28)
        at scala.tools.scalac.Main.main(Main.scala:28)
what expected Should compile.
[back to overview]
Changes of this bug report
Stephane  edited on  2006-07-11 16:47:15.0
Fixed since Scala 2.0.x
Stephane  edited on  2006-07-11 16:47:41.0