@@ -755,12 +755,23 @@ abstract class BCodeTypes extends BCodeIdiomatic {
755
755
innerSym.rawname + innerSym.moduleSuffix
756
756
}
757
757
758
- val flagsWithFinal : Int = mkFlags(
758
+ // TODO @lry compare with table in spec: for example, deprecated should not be there it seems.
759
+ // http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-4.html#jvms-4.7.6-300-D.1-D.1
760
+ // including "deprecated" was added in the initial commit of GenASM, but it was never in GenJVM.
761
+ val flags : Int = mkFlags(
762
+ // TODO @lry adding "static" whenever the class is owned by a module seems wrong.
763
+ // class C { object O { class I } }
764
+ // here, I is marked static in the InnerClass attribute. But the I constructor takes an outer instance.
765
+ // was added in 0469d41
766
+ // what should it be? check what would make sense for java reflection.
767
+ // member of top-level object should be static? how about anonymous / local class that has
768
+ // been lifted to a top-level object?
769
+ // member that is only nested in objects should be static?
770
+ // verify: will ICodeReader still work after that? the code was introduced because of icode reader.
759
771
if (innerSym.rawowner.hasModuleFlag) asm.Opcodes .ACC_STATIC else 0 ,
760
772
javaFlags(innerSym),
761
773
if (isDeprecated(innerSym)) asm.Opcodes .ACC_DEPRECATED else 0 // ASM pseudo-access flag
762
774
) & (INNER_CLASSES_FLAGS | asm.Opcodes .ACC_DEPRECATED )
763
- val flags = if (innerSym.isModuleClass) flagsWithFinal & ~ asm.Opcodes .ACC_FINAL else flagsWithFinal // For SI-5676, object overriding.
764
775
765
776
val jname = innerSym.javaBinaryName.toString // never null
766
777
val oname = { // null when method-enclosed
0 commit comments