Aladdin - Scala Bugtracking
[#168] project: compiler priority: medium category: bug
submitter assigned to status date submitted
Philippe Philippe fixed 2003-09-30 18:52:18.0
subject interpreter can't find method implementation
code
class Foo {
  class Bar;
  def foo = new Bar;
}

object Test  {
  def main(args: Array[String]): Unit = {
    (new Foo).foo;
    ()
  }
}
what happened
The interpreter crashes because it can't find the implementation of method Foo.foo.
what expected

The program should run without any error.

[back to overview]
Changes of this bug report
Philippe  edited on  2003-09-30 18:55:51.0

The problem was caused by erasure because it wrongly transformed some thistypes. For example, the return type of method Foo$class.foo was wrongly transformed from Foo$class.this.Bar into Foo.this.Bar.

The problem was solved by modifiying Type.erasure to replace all prefixes by localThisTypes.

Philippe  edited on  2003-09-30 18:57:07.0

Changed subject.