Open
Description
Emitting a class file involves populating its InnerClass table as per the JVM spec.
For that, GenBCode follows the same strategy GenASM does (which in turn follows what GenJVM did): intercepting via asmClassType()
each usage of a class-name in the class file being emitted.
That gives the right answer about 99.9% of the time. However as https://issues.scala-lang.org/browse/SI-6759 explains, there are cases where that approach includes too much in the InnerClasses table.
GenBCode has a solution for that, refreshInnerClasses()
, which should be adopted as the primary mechanism (throwing away the innerClassBufferASM
that's part of the BCInnerClassGen
trait).