Fix check for local classes in approximating string table

Take local/anonymous classes and their inner classes into account.
Simplify approximation: use first available super classifier instead
of first super class. This approximation should only happen for
private declarations that were not previously approximated by frontend.
So basically the only requirement for the approximated types is to be
denotable. Note that this only works if the types are not used later.
JVM uses a different string table implementatin as it needs exact
types of private members for reflection.

^KT-20996 Fixed
This commit is contained in:
Pavel Kirpichenkov
2021-01-18 19:52:15 +03:00
parent b66f5c8180
commit 5c28762c02
6 changed files with 106 additions and 15 deletions
@@ -15,6 +15,9 @@ public final class C {
private final val propAI: C.propAI.<no name provided>
private final val propG: C.propG.<no name provided>
private final val propI: C.propI.<no name provided>
private final val propL: C.propL.<anonymous>.L
private final val propL2: C.propL2.<anonymous>.L.L1.L2
private final val propOI: C.propOI.<no name provided>.D
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String