Aladdin - Scala Bugtracking
[#461] project: nsc priority: medium category: bug
submitter assigned to status date submitted
Iulian _ fixed 2005-10-17 17:03:45.0
subject [nsc] Anonymous classes dissapear after lambdalift
code
trait _List {
  def elements: Iterator[Int] = new Iterator[Int] {
    var current: _List = _List.this;
    def hasNext: Boolean = false;
    def next: Int = 0;
  }
}
what happened
the anonymous class List$$anon0 dissapears from the tree. The 'elements' method will reference an inexistant cla\
ss:
[[syntax trees at end of lambdalift]]// Scala source: lift.scala
package  {
  abstract trait _List extends java.lang.Object with scala.ScalaObject {
    def elements(): scala.Iterator
  };
  abstract trait _List$class extends java.lang.Object with scala.ScalaObject$class with _List {
    def elements(): scala.Iterator = {
      new _List#$anon0.(_List$class.this)
    };
    def $init$(): scala.Unit = {
      _List$class.super[ScalaObject$class].$init$();
      ()
    }
  }
}
what expected see above
[back to overview]
Changes of this bug report
Iulian  edited on  2005-10-18 13:33:28.0
Iulian  edited on  2005-11-04 10:37:36.0