Closed scabug closed 12 years ago
Imported From: https://issues.scala-lang.org/browse/SI-1430?orig=1 Reporter: @dragos
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:
tore out all the invokedynamic support. The shipped jdk7 implementation shows limited resemblance to the one this was written against; the code mostly serves to distract. (I think I could get invokedynamic working pretty quickly, except that it would mean having a codebase for java7 and one for 5-6, which is not a yak I wish to shave today.)
gave NullClass and NothingClass objects of their own, which allowed a nice polymorphic simplification of isSubClass, plus a couple other streamlinings.
@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.
@paulp said: Oh, yes, indeed it makes no sense without Bar extending Foo.
@paulp said: I updated it.
and Scala
Scalac generates bytecode referencing
Foo.foo
instead of the most specificBar.foo
, which results in anIllegalAccessError
at runtime.