Aladdin - Scala Bugtracking
[#483] project: nsc priority: low category: bug
submitter assigned to status date submitted
Iulian Martin fixed 2005-11-10 11:29:34.0
subject wrong outer parameter sent to superclass ctor
code
object Obj {

  def main(args: Array[String]) = {
    class X;

    class Y extends X;
  }
}
what happened
  class Obj$Y0 extends Obj$X0 with scala.ScalaObject {
    private   val $outer : Obj = _;
       def $outer(): Obj = Obj$Y0.this.$outer ;

    def ($outer: Obj): Obj$Y0 = {
      Obj$Y0.this.$outer  = $outer;
      Obj$Y0.super.(Obj$Y0.this.$asInstanceOf[Obj]());
      scala.ScalaObject$class.$init$(Obj$Y0.this);
      ()
    }
  }
In Obj$Y0 ctor, instead of passing the 'outer' to the superclass, Obj$Y0.this is passed (with a cast to Obj, but\ which of course is wrong).
what expected
[back to overview]
Changes of this bug report
Iulian  edited on  2005-11-10 11:32:00.0
Iulian  edited on  2005-11-10 11:32:39.0
Martin  edited on  2005-11-11 13:39:08.0