InnerClasses are lost during expansion of ASM pseudo instructions
Original issue was reported in https://github.com/jacoco/jacoco/issues/584
Based on materials in it, I created isolated reproducer that you'll find in
attachment. Result is the same for ASM 5.2 and 6.0_BETA, older versions was
not tested.
I'm not 100% sure, but similarly to comments in
#317748
following lines in ClassWriter look suspicious:
if (hasAsmInsns) {
anns = null;
ianns = null;
attrs = null;
innerClassesCount = 0; // <---
innerClasses = null; // <---
firstField = null;
lastField = null;
firstMethod = null;
lastMethod = null;
compute = MethodWriter.INSERTED_FRAMES;
hasAsmInsns = false;
new ClassReader(out.data).accept(this, ClassReader.EXPAND_FRAMES
| ClassReader.EXPAND_ASM_INSNS);
return toByteArray();
}
Regards,
Evgeny