scala / bug

Scala 2 bug reports only. Please, no questions — proper bug reports only.
https://scala-lang.org
232 stars 21 forks source link

IllegalAccessError for package-private super-interface #1430

Closed scabug closed 12 years ago

scabug commented 16 years ago
package test1;
interface Foo {
   public void foo();
}
public interface Bar extends Foo {
   public void bar();
}

and Scala

package test2
class Baz(x: Bar) {
  x.foo
}

Scalac generates bytecode referencing Foo.foo instead of the most specific Bar.foo, which results in an IllegalAccessError at runtime.

scabug commented 16 years ago

Imported From: https://issues.scala-lang.org/browse/SI-1430?orig=1 Reporter: @dragos

scabug commented 12 years ago

Commit Message Bot (anonymous) said: (extempore in r26078) Fix for erroneous bytecode generation.

A remedy for an IllegalAccessError where generated bytecode referred to an inaccessible type. Closes #1430.

Bonus materials:

scabug commented 11 years ago

@Blaisorblade said: In the above example, it's intended that Bar extends Foo, isn't it? I'm asking because this is related to #7253.

scabug commented 11 years ago

@paulp said: Oh, yes, indeed it makes no sense without Bar extending Foo.

scabug commented 11 years ago

@paulp said: I updated it.