Skip to content

Commit 44e2761

Browse files
committed
[backport] SI-6613 fixed in GenBCode
It was fixed in GenASM in 44807a7.
1 parent 6eb0812 commit 44e2761

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/compiler/scala/tools/nsc/backend/jvm/BCodeHelpers.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,8 @@ abstract class BCodeHelpers extends BCodeIdiomatic with BytecodeWriters {
329329
// If the `sym` is a java module class, we use the java class instead. This ensures that we
330330
// register the class (instead of the module class) in innerClassBufferASM.
331331
// The two symbols have the same name, so the resulting internalName is the same.
332-
val classSym = if (sym.isJavaDefined && sym.isModuleClass) sym.linkedClassOfClass else sym
332+
// Phase travel (exitingPickler) required for SI-6613 - linkedCoC is only reliable in early phases (nesting)
333+
val classSym = if (sym.isJavaDefined && sym.isModuleClass) exitingPickler(sym.linkedClassOfClass) else sym
333334
getClassBTypeAndRegisterInnerClass(classSym).internalName
334335
}
335336

0 commit comments

Comments
 (0)