Files
kotlin/compiler/testData/codegen/bytecodeListing/localFunctions/genericInnerClass.txt
Alexander Udalov c14a890e7e IR: fix capturing of type parameters in local functions
collectPotentiallyCapturedTypeParameters no longer stops on the first
class when going through parents. This is needed because otherwise type
parameters of the containing class, and its outer classes, were never
considered "captured", and thus not duplicated/remapped later in
LocalDeclarationsLowering.

This led to the IR where a local function referenced generic type
parameters of the outer class. On JVM, local function is generated into
a private static function in that container class, and static functions
can't use generic type parameters, which crashed some bytecode
processing tools.

Also, add another explicit call to `seeType` to cover references to
generic type parameters in function return types.

 #KT-45941 Fixed
2021-05-04 21:10:56 +02:00

43 lines
1.5 KiB
Plaintext
Vendored

@kotlin.Metadata
final class<Lkotlin/jvm/internal/Lambda;Lkotlin/jvm/functions/Function1<TT;Lkotlin/Unit;>;> A$B$C$f$1 {
// source: 'genericInnerClass.kt'
public final <(TT;)V> method invoke(p0: java.lang.Object): void
static <null> method <clinit>(): void
<null> method <init>(): void
public synthetic bridge <null> method invoke(p0: java.lang.Object): java.lang.Object
enclosing method A$B$C.f()V
public final static field <null> INSTANCE: A$B$C$f$1
inner (anonymous) class A$B$C$f$1
public final inner class A$B
public final inner class A$B$C
}
@kotlin.Metadata
public final class<null> A$B$C {
// source: 'genericInnerClass.kt'
public <()V> method <init>(p0: A$B): void
public final <null> method f(): void
synthetic final field <null> this$0: A$B
inner (anonymous) class A$B$C$f$1
public final inner class A$B
public final inner class A$B$C
}
@kotlin.Metadata
public final class<null> A$B {
// source: 'genericInnerClass.kt'
public <()V> method <init>(p0: A): void
synthetic final field <null> this$0: A
public final inner class A$B
public final inner class A$B$C
}
@kotlin.Metadata
public final class<<T:Ljava/lang/Object;>Ljava/lang/Object;> A {
// source: 'genericInnerClass.kt'
public final <()TT;> method getResult(): java.lang.Object
public <(TT;)V> method <init>(p0: java.lang.Object): void
private final field <TT;> result: java.lang.Object
public final inner class A$B
}