JVM_IR KT-36984 SAM wrappers are anonymous inner classes

This commit is contained in:
Dmitry Petrov
2020-12-17 11:35:39 +03:00
parent 443cd0fc2c
commit 57dd9fc87a
17 changed files with 467 additions and 17 deletions

View File

@@ -402,7 +402,7 @@ class ClassCodegen private constructor(
?: containerClass.declarations.firstIsInstanceOrNull<IrConstructor>()
?: error("Class in a non-static initializer found, but container has no constructors: ${containerClass.render()}")
} else parentFunction
if (enclosingFunction != null || irClass.isAnonymousObject) {
if (enclosingFunction != null || irClass.isAnonymousInnerClass) {
val method = enclosingFunction?.let(context.methodSignatureMapper::mapAsmMethod)
visitor.visitOuterClass(parentClassCodegen.type.internalName, method?.name, method?.descriptor)
}
@@ -411,13 +411,26 @@ class ClassCodegen private constructor(
for (klass in innerClasses) {
val innerClass = typeMapper.classInternalName(klass)
val outerClass =
if (klass.attributeOwnerId in context.isEnclosedInConstructor) null
else klass.parent.safeAs<IrClass>()?.let(typeMapper::classInternalName)
val innerName = klass.name.takeUnless { it.isSpecial }?.asString()
visitor.visitInnerClass(innerClass, outerClass, innerName, klass.calculateInnerClassAccessFlags(context))
if (klass.isSamWrapper || klass.attributeOwnerId in context.isEnclosedInConstructor)
null
else {
when (val parent = klass.parent) {
is IrClass -> typeMapper.classInternalName(parent)
else -> null
}
}
val innerName = if (klass.isAnonymousInnerClass) null else klass.name.asString()
val accessFlags = klass.calculateInnerClassAccessFlags(context)
visitor.visitInnerClass(innerClass, outerClass, innerName, accessFlags)
}
}
private val IrClass.isAnonymousInnerClass: Boolean
get() = isSamWrapper || name.isSpecial // NB '<Continuation>' is treated as anonymous inner class here
private val IrClass.isSamWrapper: Boolean
get() = origin == IrDeclarationOrigin.GENERATED_SAM_IMPLEMENTATION
override fun addInnerClassInfoFromAnnotation(innerClass: IrClass) {
// It's necessary for proper recovering of classId by plain string JVM descriptor when loading annotations
// See FileBasedKotlinClass.convertAnnotationVisitor

View File

@@ -16,3 +16,23 @@ fun <T> test() {
x.foo<Any>()
}
class Test {
fun <T> test() {
val x = object {
fun <S1> foo() {}
fun <S2> S2.ext() {}
val <S3> S3.extVal
get() = 1
var <S4> S4.extVar
get() = 1
set(value) {}
}
x.foo<Any>()
}
}

View File

@@ -17,3 +17,24 @@ public final class<null> AnonymousObjectInGenericFunKt {
public final static <<T:Ljava/lang/Object;>()V> method test(): void
inner (anonymous) class AnonymousObjectInGenericFunKt$test$x$1
}
@kotlin.Metadata
public final class<null> Test$test$x$1 {
// source: 'anonymousObjectInGenericFun.kt'
public final <<S1:Ljava/lang/Object;>()V> method foo(): void
public final <<S2:Ljava/lang/Object;>(TS2;)V> method ext(p0: java.lang.Object): void
public final <<S3:Ljava/lang/Object;>(TS3;)I> method getExtVal(p0: java.lang.Object): int
public final <<S4:Ljava/lang/Object;>(TS4;)I> method getExtVar(p0: java.lang.Object): int
public final <<S4:Ljava/lang/Object;>(TS4;I)V> method setExtVar(p0: java.lang.Object, p1: int): void
<null> method <init>(): void
enclosing method Test.test()V
inner (anonymous) class Test$test$x$1
}
@kotlin.Metadata
public final class<null> Test {
// source: 'anonymousObjectInGenericFun.kt'
public final <<T:Ljava/lang/Object;>()V> method test(): void
public <null> method <init>(): void
inner (anonymous) class Test$test$x$1
}

View File

@@ -12,8 +12,9 @@ final class<null> TKt$sam$Sam$0 {
public final <null> method equals(@org.jetbrains.annotations.Nullable p0: java.lang.Object): boolean
public synthetic final <null> method get(): java.lang.Object
public final <null> method hashCode(): int
enclosing class TKt
private synthetic final field <null> function: kotlin.jvm.functions.Function0
final inner class TKt$sam$Sam$0
inner (anonymous) class TKt$sam$Sam$0
}
@kotlin.Metadata
@@ -21,5 +22,5 @@ public final class<null> TKt {
// source: 't.kt'
public final static <<T:Ljava/lang/Object;>(LSam<TT;>;)TT;> method expectsSam(@org.jetbrains.annotations.NotNull p0: Sam): java.lang.Object
public final static <<T:Ljava/lang/Object;>(Lkotlin/jvm/functions/Function0<+TT;>;)TT;> method genericSam(@org.jetbrains.annotations.NotNull p0: kotlin.jvm.functions.Function0): java.lang.Object
final inner class TKt$sam$Sam$0
inner (anonymous) class TKt$sam$Sam$0
}

View File

@@ -3,13 +3,14 @@ final class<null> TKt$sam$Sam$0 {
// source: 't.kt'
<null> method <init>(@org.jetbrains.annotations.NotNull p0: kotlin.jvm.functions.Function0): void
public synthetic final <null> method get(): java.lang.Object
enclosing class TKt
private synthetic final field <null> function: kotlin.jvm.functions.Function0
final inner class TKt$sam$Sam$0
inner (anonymous) class TKt$sam$Sam$0
}
@kotlin.Metadata
public final class<null> TKt {
// source: 't.kt'
public final static <<T:Ljava/lang/Object;>(Lkotlin/jvm/functions/Function0<+TT;>;)TT;> method genericSam(@org.jetbrains.annotations.NotNull p0: kotlin.jvm.functions.Function0): java.lang.Object
final inner class TKt$sam$Sam$0
inner (anonymous) class TKt$sam$Sam$0
}

View File

@@ -0,0 +1,24 @@
// FILE: test.kt
fun test1() {
val f = { }
val t1 = Runnable(f)
val t2 = Runnable(f)
}
fun test2() {
val t1 = getWrapped1()
val t2 = getWrapped2()
}
// FILE: f1.kt
fun getWrapped1(): Runnable {
val f = { }
return Runnable(f)
}
// FILE: f2.kt
fun getWrapped2(): Runnable {
val f = { }
return Runnable(f)
}

View File

@@ -0,0 +1,81 @@
@kotlin.Metadata
final class F1Kt$getWrapped1$f$1 {
// source: 'f1.kt'
enclosing method F1Kt.getWrapped1()Ljava/lang/Runnable;
public final static field INSTANCE: F1Kt$getWrapped1$f$1
inner (anonymous) class F1Kt$getWrapped1$f$1
static method <clinit>(): void
method <init>(): void
public synthetic bridge method invoke(): java.lang.Object
public final method invoke(): void
}
@kotlin.Metadata
final class F1Kt$sam$java_lang_Runnable$0 {
// source: 'f1.kt'
private synthetic final field function: kotlin.jvm.functions.Function0
method <init>(p0: kotlin.jvm.functions.Function0): void
public synthetic final method run(): void
}
@kotlin.Metadata
public final class F1Kt {
// source: 'f1.kt'
inner (anonymous) class F1Kt$getWrapped1$f$1
public final static @org.jetbrains.annotations.NotNull method getWrapped1(): java.lang.Runnable
}
@kotlin.Metadata
final class F2Kt$getWrapped2$f$1 {
// source: 'f2.kt'
enclosing method F2Kt.getWrapped2()Ljava/lang/Runnable;
public final static field INSTANCE: F2Kt$getWrapped2$f$1
inner (anonymous) class F2Kt$getWrapped2$f$1
static method <clinit>(): void
method <init>(): void
public synthetic bridge method invoke(): java.lang.Object
public final method invoke(): void
}
@kotlin.Metadata
final class F2Kt$sam$java_lang_Runnable$0 {
// source: 'f2.kt'
private synthetic final field function: kotlin.jvm.functions.Function0
method <init>(p0: kotlin.jvm.functions.Function0): void
public synthetic final method run(): void
}
@kotlin.Metadata
public final class F2Kt {
// source: 'f2.kt'
inner (anonymous) class F2Kt$getWrapped2$f$1
public final static @org.jetbrains.annotations.NotNull method getWrapped2(): java.lang.Runnable
}
@kotlin.Metadata
final class TestKt$sam$java_lang_Runnable$0 {
// source: 'test.kt'
private synthetic final field function: kotlin.jvm.functions.Function0
method <init>(p0: kotlin.jvm.functions.Function0): void
public synthetic final method run(): void
}
@kotlin.Metadata
final class TestKt$test1$f$1 {
// source: 'test.kt'
enclosing method TestKt.test1()V
public final static field INSTANCE: TestKt$test1$f$1
inner (anonymous) class TestKt$test1$f$1
static method <clinit>(): void
method <init>(): void
public synthetic bridge method invoke(): java.lang.Object
public final method invoke(): void
}
@kotlin.Metadata
public final class TestKt {
// source: 'test.kt'
inner (anonymous) class TestKt$test1$f$1
public final static method test1(): void
public final static method test2(): void
}

View File

@@ -0,0 +1,90 @@
@kotlin.Metadata
final class F1Kt$getWrapped1$f$1 {
// source: 'f1.kt'
enclosing method F1Kt.getWrapped1()Ljava/lang/Runnable;
public final static field INSTANCE: F1Kt$getWrapped1$f$1
inner (anonymous) class F1Kt$getWrapped1$f$1
static method <clinit>(): void
method <init>(): void
public synthetic bridge method invoke(): java.lang.Object
public final method invoke(): void
}
@kotlin.Metadata
final class F1Kt$sam$java_lang_Runnable$0 {
// source: 'f1.kt'
enclosing class F1Kt
private synthetic final field function: kotlin.jvm.functions.Function0
inner (anonymous) class F1Kt$sam$java_lang_Runnable$0
method <init>(@org.jetbrains.annotations.NotNull p0: kotlin.jvm.functions.Function0): void
public synthetic final method run(): void
}
@kotlin.Metadata
public final class F1Kt {
// source: 'f1.kt'
inner (anonymous) class F1Kt$getWrapped1$f$1
inner (anonymous) class F1Kt$sam$java_lang_Runnable$0
public final static @org.jetbrains.annotations.NotNull method getWrapped1(): java.lang.Runnable
}
@kotlin.Metadata
final class F2Kt$getWrapped2$f$1 {
// source: 'f2.kt'
enclosing method F2Kt.getWrapped2()Ljava/lang/Runnable;
public final static field INSTANCE: F2Kt$getWrapped2$f$1
inner (anonymous) class F2Kt$getWrapped2$f$1
static method <clinit>(): void
method <init>(): void
public synthetic bridge method invoke(): java.lang.Object
public final method invoke(): void
}
@kotlin.Metadata
final class F2Kt$sam$java_lang_Runnable$0 {
// source: 'f2.kt'
enclosing class F2Kt
private synthetic final field function: kotlin.jvm.functions.Function0
inner (anonymous) class F2Kt$sam$java_lang_Runnable$0
method <init>(@org.jetbrains.annotations.NotNull p0: kotlin.jvm.functions.Function0): void
public synthetic final method run(): void
}
@kotlin.Metadata
public final class F2Kt {
// source: 'f2.kt'
inner (anonymous) class F2Kt$getWrapped2$f$1
inner (anonymous) class F2Kt$sam$java_lang_Runnable$0
public final static @org.jetbrains.annotations.NotNull method getWrapped2(): java.lang.Runnable
}
@kotlin.Metadata
final class TestKt$sam$java_lang_Runnable$0 {
// source: 'test.kt'
enclosing class TestKt
private synthetic final field function: kotlin.jvm.functions.Function0
inner (anonymous) class TestKt$sam$java_lang_Runnable$0
method <init>(@org.jetbrains.annotations.NotNull p0: kotlin.jvm.functions.Function0): void
public synthetic final method run(): void
}
@kotlin.Metadata
final class TestKt$test1$f$1 {
// source: 'test.kt'
enclosing method TestKt.test1()V
public final static field INSTANCE: TestKt$test1$f$1
inner (anonymous) class TestKt$test1$f$1
static method <clinit>(): void
method <init>(): void
public synthetic bridge method invoke(): java.lang.Object
public final method invoke(): void
}
@kotlin.Metadata
public final class TestKt {
// source: 'test.kt'
inner (anonymous) class TestKt$sam$java_lang_Runnable$0
inner (anonymous) class TestKt$test1$f$1
public final static method test1(): void
public final static method test2(): void
}

View File

@@ -3,8 +3,9 @@ public final class<null> test/SamAdapterAndInlinedOneKt$sam$i$java_lang_Runnabl
// source: 'samAdapterAndInlinedOne.kt'
public <null> method <init>(@org.jetbrains.annotations.NotNull p0: kotlin.jvm.functions.Function0): void
public synthetic final <null> method run(): void
enclosing class test/SamAdapterAndInlinedOneKt
private synthetic final field <null> function: kotlin.jvm.functions.Function0
public final inner class test/SamAdapterAndInlinedOneKt$sam$i$java_lang_Runnable$0
inner (anonymous) class test/SamAdapterAndInlinedOneKt$sam$i$java_lang_Runnable$0
}
@kotlin.Metadata
@@ -12,8 +13,9 @@ final class<null> test/SamAdapterAndInlinedOneKt$sam$java_lang_Runnable$0 {
// source: 'samAdapterAndInlinedOne.kt'
<null> method <init>(@org.jetbrains.annotations.NotNull p0: kotlin.jvm.functions.Function0): void
public synthetic final <null> method run(): void
enclosing class test/SamAdapterAndInlinedOneKt
private synthetic final field <null> function: kotlin.jvm.functions.Function0
final inner class test/SamAdapterAndInlinedOneKt$sam$java_lang_Runnable$0
inner (anonymous) class test/SamAdapterAndInlinedOneKt$sam$java_lang_Runnable$0
}
@kotlin.Metadata
@@ -23,6 +25,6 @@ public final class<null> test/SamAdapterAndInlinedOneKt {
public final static @org.jetbrains.annotations.NotNull <(Lkotlin/jvm/functions/Function0<Lkotlin/Unit;>;)Ljava/lang/Runnable;> method noInline(@org.jetbrains.annotations.NotNull p0: kotlin.jvm.functions.Function0): java.lang.Runnable
public final static @org.jetbrains.annotations.NotNull <(Lkotlin/jvm/functions/Function0<Lkotlin/Unit;>;)Ljava/lang/Runnable;> method noInline2(@org.jetbrains.annotations.NotNull p0: kotlin.jvm.functions.Function0): java.lang.Runnable
public synthetic final static <null> method makeRunnable(p0: kotlin.jvm.functions.Function0): java.lang.Runnable
final inner class test/SamAdapterAndInlinedOneKt$sam$java_lang_Runnable$0
public final inner class test/SamAdapterAndInlinedOneKt$sam$i$java_lang_Runnable$0
inner (anonymous) class test/SamAdapterAndInlinedOneKt$sam$i$java_lang_Runnable$0
inner (anonymous) class test/SamAdapterAndInlinedOneKt$sam$java_lang_Runnable$0
}

View File

@@ -12,8 +12,9 @@ final class<null> TKt$sam$Sam$0 {
public final <null> method equals(@org.jetbrains.annotations.Nullable p0: java.lang.Object): boolean
public synthetic final <null> method get(): java.lang.Object
public final <null> method hashCode(): int
enclosing class TKt
private synthetic final field <null> function: kotlin.jvm.functions.Function0
final inner class TKt$sam$Sam$0
inner (anonymous) class TKt$sam$Sam$0
}
@kotlin.Metadata
@@ -21,5 +22,5 @@ public final class<null> TKt {
// source: 't.kt'
public final static @org.jetbrains.annotations.NotNull <(Lkotlin/jvm/functions/Function0<Ljava/lang/String;>;)Ljava/lang/String;> method specializedSam(@org.jetbrains.annotations.NotNull p0: kotlin.jvm.functions.Function0): java.lang.String
public final static <<T:Ljava/lang/Object;>(LSam<TT;>;)TT;> method expectsSam(@org.jetbrains.annotations.NotNull p0: Sam): java.lang.Object
final inner class TKt$sam$Sam$0
inner (anonymous) class TKt$sam$Sam$0
}

View File

@@ -3,13 +3,14 @@ final class<null> TKt$sam$Sam$0 {
// source: 't.kt'
<null> method <init>(@org.jetbrains.annotations.NotNull p0: kotlin.jvm.functions.Function0): void
public synthetic final <null> method get(): java.lang.Object
enclosing class TKt
private synthetic final field <null> function: kotlin.jvm.functions.Function0
final inner class TKt$sam$Sam$0
inner (anonymous) class TKt$sam$Sam$0
}
@kotlin.Metadata
public final class<null> TKt {
// source: 't.kt'
public final static <(Lkotlin/jvm/functions/Function0<Ljava/lang/String;>;)Ljava/lang/String;> method specializedSam(@org.jetbrains.annotations.NotNull p0: kotlin.jvm.functions.Function0): java.lang.String
final inner class TKt$sam$Sam$0
inner (anonymous) class TKt$sam$Sam$0
}

View File

@@ -0,0 +1,16 @@
class A {
fun test1a() = B().runnable1()
fun test1b() = B().runnable1()
fun test2a() = B().runnable2()
fun test2b() = B().runnable2()
fun testRunnableSamCtor1() = B().runnableSamCtor {}
fun testRunnableSamCtor2() = B().runnableSamCtor {}
}
class B {
inline fun runnable1() = Runnable {}
inline fun runnable2() = Runnable {}
inline fun runnableSamCtor(noinline s: () -> Unit ) = Runnable (s)
}

View File

@@ -0,0 +1,78 @@
@kotlin.Metadata
final class A$testRunnableSamCtor1$1 {
// source: 'wrapperInlinedFromAnotherClass.kt'
enclosing method A.testRunnableSamCtor1()Ljava/lang/Runnable;
public final static field INSTANCE: A$testRunnableSamCtor1$1
inner (anonymous) class A$testRunnableSamCtor1$1
static method <clinit>(): void
method <init>(): void
public synthetic bridge method invoke(): java.lang.Object
public final method invoke(): void
}
@kotlin.Metadata
final class A$testRunnableSamCtor2$1 {
// source: 'wrapperInlinedFromAnotherClass.kt'
enclosing method A.testRunnableSamCtor2()Ljava/lang/Runnable;
public final static field INSTANCE: A$testRunnableSamCtor2$1
inner (anonymous) class A$testRunnableSamCtor2$1
static method <clinit>(): void
method <init>(): void
public synthetic bridge method invoke(): java.lang.Object
public final method invoke(): void
}
@kotlin.Metadata
public final class A {
// source: 'wrapperInlinedFromAnotherClass.kt'
inner (anonymous) class A$testRunnableSamCtor1$1
inner (anonymous) class A$testRunnableSamCtor2$1
public method <init>(): void
public final @org.jetbrains.annotations.NotNull method test1a(): java.lang.Runnable
public final @org.jetbrains.annotations.NotNull method test1b(): java.lang.Runnable
public final @org.jetbrains.annotations.NotNull method test2a(): java.lang.Runnable
public final @org.jetbrains.annotations.NotNull method test2b(): java.lang.Runnable
public final @org.jetbrains.annotations.NotNull method testRunnableSamCtor1(): java.lang.Runnable
public final @org.jetbrains.annotations.NotNull method testRunnableSamCtor2(): java.lang.Runnable
}
@kotlin.Metadata
public final class B$runnable1$1 {
// source: 'wrapperInlinedFromAnotherClass.kt'
enclosing method B.runnable1()Ljava/lang/Runnable;
public final static field INSTANCE: B$runnable1$1
inner (anonymous) class B$runnable1$1
static method <clinit>(): void
public method <init>(): void
public final method run(): void
}
@kotlin.Metadata
public final class B$runnable2$1 {
// source: 'wrapperInlinedFromAnotherClass.kt'
enclosing method B.runnable2()Ljava/lang/Runnable;
public final static field INSTANCE: B$runnable2$1
inner (anonymous) class B$runnable2$1
static method <clinit>(): void
public method <init>(): void
public final method run(): void
}
@kotlin.Metadata
public final class B$sam$i$java_lang_Runnable$0 {
// source: 'wrapperInlinedFromAnotherClass.kt'
private synthetic final field function: kotlin.jvm.functions.Function0
public method <init>(p0: kotlin.jvm.functions.Function0): void
public synthetic final method run(): void
}
@kotlin.Metadata
public final class B {
// source: 'wrapperInlinedFromAnotherClass.kt'
inner (anonymous) class B$runnable1$1
inner (anonymous) class B$runnable2$1
public method <init>(): void
public final @org.jetbrains.annotations.NotNull method runnable1(): java.lang.Runnable
public final @org.jetbrains.annotations.NotNull method runnable2(): java.lang.Runnable
public final @org.jetbrains.annotations.NotNull method runnableSamCtor(@org.jetbrains.annotations.NotNull p0: kotlin.jvm.functions.Function0): java.lang.Runnable
}

View File

@@ -0,0 +1,81 @@
@kotlin.Metadata
final class A$testRunnableSamCtor1$1 {
// source: 'wrapperInlinedFromAnotherClass.kt'
enclosing method A.testRunnableSamCtor1()Ljava/lang/Runnable;
public final static field INSTANCE: A$testRunnableSamCtor1$1
inner (anonymous) class A$testRunnableSamCtor1$1
static method <clinit>(): void
method <init>(): void
public synthetic bridge method invoke(): java.lang.Object
public final method invoke(): void
}
@kotlin.Metadata
final class A$testRunnableSamCtor2$1 {
// source: 'wrapperInlinedFromAnotherClass.kt'
enclosing method A.testRunnableSamCtor2()Ljava/lang/Runnable;
public final static field INSTANCE: A$testRunnableSamCtor2$1
inner (anonymous) class A$testRunnableSamCtor2$1
static method <clinit>(): void
method <init>(): void
public synthetic bridge method invoke(): java.lang.Object
public final method invoke(): void
}
@kotlin.Metadata
public final class A {
// source: 'wrapperInlinedFromAnotherClass.kt'
inner (anonymous) class A$testRunnableSamCtor1$1
inner (anonymous) class A$testRunnableSamCtor2$1
public method <init>(): void
public final @org.jetbrains.annotations.NotNull method test1a(): java.lang.Runnable
public final @org.jetbrains.annotations.NotNull method test1b(): java.lang.Runnable
public final @org.jetbrains.annotations.NotNull method test2a(): java.lang.Runnable
public final @org.jetbrains.annotations.NotNull method test2b(): java.lang.Runnable
public final @org.jetbrains.annotations.NotNull method testRunnableSamCtor1(): java.lang.Runnable
public final @org.jetbrains.annotations.NotNull method testRunnableSamCtor2(): java.lang.Runnable
}
@kotlin.Metadata
public final class B$runnable1$1 {
// source: 'wrapperInlinedFromAnotherClass.kt'
enclosing method B.runnable1()Ljava/lang/Runnable;
public final static field INSTANCE: B$runnable1$1
inner (anonymous) class B$runnable1$1
static method <clinit>(): void
public method <init>(): void
public final method run(): void
}
@kotlin.Metadata
public final class B$runnable2$1 {
// source: 'wrapperInlinedFromAnotherClass.kt'
enclosing method B.runnable2()Ljava/lang/Runnable;
public final static field INSTANCE: B$runnable2$1
inner (anonymous) class B$runnable2$1
static method <clinit>(): void
public method <init>(): void
public final method run(): void
}
@kotlin.Metadata
public final class B$sam$i$java_lang_Runnable$0 {
// source: 'wrapperInlinedFromAnotherClass.kt'
enclosing class B
private synthetic final field function: kotlin.jvm.functions.Function0
inner (anonymous) class B$sam$i$java_lang_Runnable$0
public method <init>(@org.jetbrains.annotations.NotNull p0: kotlin.jvm.functions.Function0): void
public synthetic final method run(): void
}
@kotlin.Metadata
public final class B {
// source: 'wrapperInlinedFromAnotherClass.kt'
inner (anonymous) class B$runnable1$1
inner (anonymous) class B$runnable2$1
inner (anonymous) class B$sam$i$java_lang_Runnable$0
public method <init>(): void
public final @org.jetbrains.annotations.NotNull method runnable1(): java.lang.Runnable
public final @org.jetbrains.annotations.NotNull method runnable2(): java.lang.Runnable
public final @org.jetbrains.annotations.NotNull method runnableSamCtor(@org.jetbrains.annotations.NotNull p0: kotlin.jvm.functions.Function0): java.lang.Runnable
}

View File

@@ -1568,6 +1568,11 @@ public class BytecodeListingTestGenerated extends AbstractBytecodeListingTest {
runTest("compiler/testData/codegen/bytecodeListing/sam/lambdaSpecializedSamInterface.kt");
}
@TestMetadata("reusedSamWrapperClasses.kt")
public void testReusedSamWrapperClasses() throws Exception {
runTest("compiler/testData/codegen/bytecodeListing/sam/reusedSamWrapperClasses.kt");
}
@TestMetadata("samAdapterAndInlinedOne.kt")
public void testSamAdapterAndInlinedOne() throws Exception {
runTest("compiler/testData/codegen/bytecodeListing/sam/samAdapterAndInlinedOne.kt");
@@ -1582,6 +1587,11 @@ public class BytecodeListingTestGenerated extends AbstractBytecodeListingTest {
public void testSpecializedSamInterface() throws Exception {
runTest("compiler/testData/codegen/bytecodeListing/sam/specializedSamInterface.kt");
}
@TestMetadata("wrapperInlinedFromAnotherClass.kt")
public void testWrapperInlinedFromAnotherClass() throws Exception {
runTest("compiler/testData/codegen/bytecodeListing/sam/wrapperInlinedFromAnotherClass.kt");
}
}
@TestMetadata("compiler/testData/codegen/bytecodeListing/specialBridges")

View File

@@ -1568,6 +1568,11 @@ public class IrBytecodeListingTestGenerated extends AbstractIrBytecodeListingTes
runTest("compiler/testData/codegen/bytecodeListing/sam/lambdaSpecializedSamInterface.kt");
}
@TestMetadata("reusedSamWrapperClasses.kt")
public void testReusedSamWrapperClasses() throws Exception {
runTest("compiler/testData/codegen/bytecodeListing/sam/reusedSamWrapperClasses.kt");
}
@TestMetadata("samAdapterAndInlinedOne.kt")
public void testSamAdapterAndInlinedOne() throws Exception {
runTest("compiler/testData/codegen/bytecodeListing/sam/samAdapterAndInlinedOne.kt");
@@ -1582,6 +1587,11 @@ public class IrBytecodeListingTestGenerated extends AbstractIrBytecodeListingTes
public void testSpecializedSamInterface() throws Exception {
runTest("compiler/testData/codegen/bytecodeListing/sam/specializedSamInterface.kt");
}
@TestMetadata("wrapperInlinedFromAnotherClass.kt")
public void testWrapperInlinedFromAnotherClass() throws Exception {
runTest("compiler/testData/codegen/bytecodeListing/sam/wrapperInlinedFromAnotherClass.kt");
}
}
@TestMetadata("compiler/testData/codegen/bytecodeListing/specialBridges")