Aladdin - Scala Bugtracking
[#310] project: compiler priority: high category: bug
submitter assigned to status date submitted
Stephane Martin fixed 2004-03-16 19:11:51.0
subject AssertionError in TreeChecker
code
<pre>trait BarBar() {
  def apply(): Object = null;
}

object Bar {
  def load() = new BarBar() { override def apply() = null; };
}

object Main {
  def main(args: Array[String]) = {
    val foo = new Object() {
      val bar = Bar.load();
      def apply() = bar.apply();
    };
  }
}</pre>
what happened
Exception in thread "main" java.lang.AssertionError:
unit        : Main.scala
clasz       : Main.$anon$1
member      : Main.$anon$1.apply
owner       : Main.$anon$1.apply
tree        : $anon$1.this.bar().apply
tree.pos    : 14:24
tree.symbol : Bar.$anon$0.apply
tree.type   : ()AllRef
        at scalac.checkers.TreeChecker.selection(TreeChecker.java:390)
        [..]
what expected
[back to overview]
Changes of this bug report
Stephane  edited on  2004-03-16 19:12:08.0
Martin  edited on  2004-04-15 18:14:06.0
Martin  edited on  2004-04-15 18:25:09.0
I fixed by supporessing refinements of value members as these cannot be accessed at the moment.