[JVM_IR] Limit inner class attributes to types in class file (#5081)

* [JVM_IR] Limit inner class attributes to types in class file

Inner class attributes should only be recorded for types that
are materialized in the result class file. In particular, we
should not emit inner classes attributes for types that appear
only in fake overrides. We do map these types to track the
fake overrides for JVM signature clashes but they are not
materialized in the class file.

^KT-56104 Fixed

* [JVM_IR] Consistently pass around materialized boolean in mapType.
This commit is contained in:
Mads Sig Ager
2023-01-30 14:11:07 +01:00
committed by GitHub
parent c9aeadd31f
commit 7c3cc1d5c1
8 changed files with 86 additions and 42 deletions
@@ -0,0 +1,13 @@
// TARGET_BACKEND: JVM_IR
// FILE: classes.kt
open class A {
class Inner
fun foo(i: Inner): Inner = Inner()
}
class B: A()
// A and A$Inner both need an inner class attribute for the relationship. B does not.
// 2 INNERCLASS A\$Inner A Inner