Aladdin - Scala Bugtracking
[#396] project: compiler priority: high category: bug
submitter assigned to status date submitted
Martin Philippe fixed 2005-01-31 11:24:50.0
subject incorrect code for super calls in deep mixins
code
package mixins {

  class A {
    class I {
      def run = System.out.print("A");
    }
  }
  class B extends A {
    class I extends super.I {
      override def run = { super.run; System.out.print("B"); }
    }
  }
  class C extends A {
    class I extends super.I {
      override def run = { super.run; System.out.print("C"); }
    }
  }
  object Test extends B with C with Application {
    class I2 extends super[B].I with super[C].I;
    (new I2).run
  }
}
what happened
prints "AB"
what expected should print "ABC". The problem is a condensation of a proposed solution to the EPL problem posed by Cook and Batory in the paper that I have sent around. I have to send the review report by the end fo the week. It would be great if we had a fix by then, as this could significantly change the way Scala is represented in this paper.
[back to overview]
Changes of this bug report
Philippe  edited on  2005-02-09 15:18:11.0
The problem was mainly due to an incorrect implementation of the symbol lookup method in class Type. The problem has been resolved be rewriting this method in such a way that it uses the same lookup algorithm as the name lookup method.