diff --git a/compiler/backend/src/org/jetbrains/kotlin/codegen/SamWrapperClasses.kt b/compiler/backend/src/org/jetbrains/kotlin/codegen/SamWrapperClasses.kt index 202a995dcaa..83b9639b27b 100644 --- a/compiler/backend/src/org/jetbrains/kotlin/codegen/SamWrapperClasses.kt +++ b/compiler/backend/src/org/jetbrains/kotlin/codegen/SamWrapperClasses.kt @@ -36,14 +36,16 @@ class SamWrapperClasses(private val state: GenerationState) { expressionCodegen: ExpressionCodegen, contextDescriptor: CallableMemberDescriptor ): Type { - val isInsideInline = InlineUtil.isInlineOrContainingInline(expressionCodegen.context.contextDescriptor) || - isInsideInlineLambdaContext(expressionCodegen.context, state) + val parentContext = expressionCodegen.context + val isInsideInline = InlineUtil.isInlineOrContainingInline(parentContext.contextDescriptor) || + isInsideInlineLambdaContext(parentContext, state) return samInterfaceToWrapperClass.getOrPut(WrapperKey(samType, file, isInsideInline)) { - SamWrapperCodegen(state, samType, expressionCodegen.parentCodegen, isInsideInline).genWrapper(file, contextDescriptor) + SamWrapperCodegen(state, samType, expressionCodegen.parentCodegen, parentContext, isInsideInline) + .genWrapper(file, contextDescriptor) } } - private fun isInsideInlineLambdaContext(context: CodegenContext<*>, state: GenerationState):Boolean { + private fun isInsideInlineLambdaContext(context: CodegenContext<*>, state: GenerationState): Boolean { var parent: CodegenContext<*>? = context while (parent != null && parent != state.rootContext) { if (parent is InlineLambdaContext) return true diff --git a/compiler/backend/src/org/jetbrains/kotlin/codegen/SamWrapperCodegen.java b/compiler/backend/src/org/jetbrains/kotlin/codegen/SamWrapperCodegen.java index afea19b7fe3..878e316cf6d 100644 --- a/compiler/backend/src/org/jetbrains/kotlin/codegen/SamWrapperCodegen.java +++ b/compiler/backend/src/org/jetbrains/kotlin/codegen/SamWrapperCodegen.java @@ -21,7 +21,6 @@ import org.jetbrains.annotations.NotNull; import org.jetbrains.kotlin.backend.common.CodegenUtil; import org.jetbrains.kotlin.codegen.context.ClassContext; import org.jetbrains.kotlin.codegen.context.CodegenContext; -import org.jetbrains.kotlin.codegen.context.FieldOwnerContext; import org.jetbrains.kotlin.codegen.state.GenerationState; import org.jetbrains.kotlin.codegen.state.KotlinTypeMapper; import org.jetbrains.kotlin.config.LanguageFeature; @@ -64,6 +63,7 @@ public class SamWrapperCodegen { private final KotlinTypeMapper typeMapper; private final SamType samType; private final MemberCodegen parentCodegen; + private final CodegenContext parentContext; private final int visibility; private final int classFlags; public static final String SAM_WRAPPER_SUFFIX = "$0"; @@ -72,6 +72,7 @@ public class SamWrapperCodegen { @NotNull GenerationState state, @NotNull SamType samType, @NotNull MemberCodegen parentCodegen, + @NotNull CodegenContext parentContext, boolean isInsideInline ) { this.state = state; @@ -79,6 +80,7 @@ public class SamWrapperCodegen { this.typeMapper = state.getTypeMapper(); this.samType = samType; this.parentCodegen = parentCodegen; + this.parentContext = parentContext; visibility = isInsideInline ? ACC_PUBLIC : NO_FLAG_PACKAGE_PRIVATE; int synth = state.getLanguageVersionSettings().supportsFeature(LanguageFeature.SamWrapperClassesAreSynthetic) ? ACC_SYNTHETIC : 0; classFlags = visibility | ACC_FINAL | ACC_SUPER | synth; @@ -170,7 +172,6 @@ public class SamWrapperCodegen { private void generateInnerClassInformation(@NotNull KtFile file, Type asmType, ClassBuilder cv) { parentCodegen.addSyntheticAnonymousInnerClass(new SyntheticInnerClassInfo(asmType.getInternalName(), classFlags)); - FieldOwnerContext parentContext = parentCodegen.context; CodegenContext outerContext = MemberCodegen.getNonInlineOuterContext(parentContext); assert outerContext != null : "Outer context for SAM wrapper " + asmType.getInternalName() + " is null, parentContext:" + parentContext; diff --git a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirBlackBoxCodegenTestGenerated.java b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirBlackBoxCodegenTestGenerated.java index 802d44a3b05..ee8d7b6f999 100644 --- a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirBlackBoxCodegenTestGenerated.java +++ b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirBlackBoxCodegenTestGenerated.java @@ -15184,6 +15184,12 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT runTest("compiler/testData/codegen/box/funInterface/irrelevantPrivateDeclarations.kt"); } + @Test + @TestMetadata("kt44827_funInterface.kt") + public void testKt44827_funInterface() throws Exception { + runTest("compiler/testData/codegen/box/funInterface/kt44827_funInterface.kt"); + } + @Test @TestMetadata("multimodule.kt") public void testMultimodule() throws Exception { @@ -37074,6 +37080,12 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT runTest("compiler/testData/codegen/box/sam/kt31908.kt"); } + @Test + @TestMetadata("kt44827_sam.kt") + public void testKt44827_sam() throws Exception { + runTest("compiler/testData/codegen/box/sam/kt44827_sam.kt"); + } + @Test @TestMetadata("kt4753.kt") public void testKt4753() throws Exception { diff --git a/compiler/testData/codegen/box/funInterface/kt44827_funInterface.kt b/compiler/testData/codegen/box/funInterface/kt44827_funInterface.kt new file mode 100644 index 00000000000..9ab9a9ce620 --- /dev/null +++ b/compiler/testData/codegen/box/funInterface/kt44827_funInterface.kt @@ -0,0 +1,22 @@ +// TARGET_BACKEND: JVM +// WITH_RUNTIME + +fun interface J { + operator fun invoke(): String +} + +fun invoke(j: J): String { + // Check that there's something sensible in the EnclosingMethod; crashes if it's not the case. + j.javaClass.enclosingMethod + + return j() +} + +class A(val result: String) + +fun box(): String { + var a = A("OK") + return 42.let { + invoke(a::result) + } +} diff --git a/compiler/testData/codegen/box/sam/kt44827_sam.kt b/compiler/testData/codegen/box/sam/kt44827_sam.kt new file mode 100644 index 00000000000..54c7ac030df --- /dev/null +++ b/compiler/testData/codegen/box/sam/kt44827_sam.kt @@ -0,0 +1,25 @@ +// TARGET_BACKEND: JVM +// WITH_RUNTIME +// FILE: test.kt + +fun invoke(j: J): String { + // Check that there's something sensible in the EnclosingMethod; crashes if it's not the case. + j.javaClass.enclosingMethod + + return j() +} + +class A(val result: String) + +fun box(): String { + var a = A("OK") + return 42.let { + invoke(a::result) + } +} + +// FILE: J.java + +public interface J { + String invoke(); +} diff --git a/compiler/testData/codegen/bytecodeListing/sam/callableRefGenericFunInterface.txt b/compiler/testData/codegen/bytecodeListing/sam/callableRefGenericFunInterface.txt index 7eb0d2a7d5a..a6801a24c05 100644 --- a/compiler/testData/codegen/bytecodeListing/sam/callableRefGenericFunInterface.txt +++ b/compiler/testData/codegen/bytecodeListing/sam/callableRefGenericFunInterface.txt @@ -23,7 +23,7 @@ synthetic final class TKt$sam$Sam$0 { public synthetic final method get(): java.lang.Object public method getFunctionDelegate(): kotlin.Function public method hashCode(): int - enclosing class TKt + enclosing method TKt.genericSam()Ljava/lang/Object; private synthetic final field function: kotlin.jvm.functions.Function0 inner (anonymous) class TKt$sam$Sam$0 } diff --git a/compiler/testData/codegen/bytecodeListing/sam/callableRefGenericSamInterface.txt b/compiler/testData/codegen/bytecodeListing/sam/callableRefGenericSamInterface.txt index 529b0266dc1..db0256e7d81 100644 --- a/compiler/testData/codegen/bytecodeListing/sam/callableRefGenericSamInterface.txt +++ b/compiler/testData/codegen/bytecodeListing/sam/callableRefGenericSamInterface.txt @@ -14,7 +14,7 @@ synthetic final class TKt$sam$Sam$0 { // source: 't.kt' method (p0: kotlin.jvm.functions.Function0): void public synthetic final method get(): java.lang.Object - enclosing class TKt + enclosing method TKt.genericSam()Ljava/lang/Object; private synthetic final field function: kotlin.jvm.functions.Function0 inner (anonymous) class TKt$sam$Sam$0 } diff --git a/compiler/testData/codegen/bytecodeListing/sam/callableRefSpecializedFunInterface.txt b/compiler/testData/codegen/bytecodeListing/sam/callableRefSpecializedFunInterface.txt index b1dc7e49e7b..37996d7eeec 100644 --- a/compiler/testData/codegen/bytecodeListing/sam/callableRefSpecializedFunInterface.txt +++ b/compiler/testData/codegen/bytecodeListing/sam/callableRefSpecializedFunInterface.txt @@ -12,7 +12,7 @@ synthetic final class TKt$sam$Sam$0 { public synthetic final method get(): java.lang.Object public method getFunctionDelegate(): kotlin.Function public method hashCode(): int - enclosing class TKt + enclosing method TKt.specializedSam()Ljava/lang/String; private synthetic final field function: kotlin.jvm.functions.Function0 inner (anonymous) class TKt$sam$Sam$0 } diff --git a/compiler/testData/codegen/bytecodeListing/sam/callableRefSpecializedSamInterface.txt b/compiler/testData/codegen/bytecodeListing/sam/callableRefSpecializedSamInterface.txt index fcb80dea923..aa2260f29ed 100644 --- a/compiler/testData/codegen/bytecodeListing/sam/callableRefSpecializedSamInterface.txt +++ b/compiler/testData/codegen/bytecodeListing/sam/callableRefSpecializedSamInterface.txt @@ -3,7 +3,7 @@ synthetic final class TKt$sam$Sam$0 { // source: 't.kt' method (p0: kotlin.jvm.functions.Function0): void public synthetic final method get(): java.lang.Object - enclosing class TKt + enclosing method TKt.specializedSam()Ljava/lang/String; private synthetic final field function: kotlin.jvm.functions.Function0 inner (anonymous) class TKt$sam$Sam$0 } diff --git a/compiler/testData/codegen/bytecodeListing/sam/genericFunInterface.txt b/compiler/testData/codegen/bytecodeListing/sam/genericFunInterface.txt index 9f015803fa1..a5ebadb9da7 100644 --- a/compiler/testData/codegen/bytecodeListing/sam/genericFunInterface.txt +++ b/compiler/testData/codegen/bytecodeListing/sam/genericFunInterface.txt @@ -12,7 +12,7 @@ synthetic final class TKt$sam$Sam$0 { public synthetic final method get(): java.lang.Object public method getFunctionDelegate(): kotlin.Function public method hashCode(): int - enclosing class TKt + enclosing method TKt.genericSam(Lkotlin/jvm/functions/Function0;)Ljava/lang/Object; private synthetic final field function: kotlin.jvm.functions.Function0 inner (anonymous) class TKt$sam$Sam$0 } diff --git a/compiler/testData/codegen/bytecodeListing/sam/genericSamInterface.txt b/compiler/testData/codegen/bytecodeListing/sam/genericSamInterface.txt index 730f7bff931..863d85589c5 100644 --- a/compiler/testData/codegen/bytecodeListing/sam/genericSamInterface.txt +++ b/compiler/testData/codegen/bytecodeListing/sam/genericSamInterface.txt @@ -3,7 +3,7 @@ synthetic final class TKt$sam$Sam$0 { // source: 't.kt' method (p0: kotlin.jvm.functions.Function0): void public synthetic final method get(): java.lang.Object - enclosing class TKt + enclosing method TKt.genericSam(Lkotlin/jvm/functions/Function0;)Ljava/lang/Object; private synthetic final field function: kotlin.jvm.functions.Function0 inner (anonymous) class TKt$sam$Sam$0 } diff --git a/compiler/testData/codegen/bytecodeListing/sam/genericSamInterface_ir.txt b/compiler/testData/codegen/bytecodeListing/sam/genericSamInterface_ir.txt new file mode 100644 index 00000000000..730f7bff931 --- /dev/null +++ b/compiler/testData/codegen/bytecodeListing/sam/genericSamInterface_ir.txt @@ -0,0 +1,16 @@ +@kotlin.Metadata +synthetic final class TKt$sam$Sam$0 { + // source: 't.kt' + method (p0: kotlin.jvm.functions.Function0): void + public synthetic final method get(): java.lang.Object + enclosing class TKt + private synthetic final field function: kotlin.jvm.functions.Function0 + inner (anonymous) class TKt$sam$Sam$0 +} + +@kotlin.Metadata +public final class TKt { + // source: 't.kt' + public final static <(Lkotlin/jvm/functions/Function0<+TT;>;)TT;> method genericSam(@org.jetbrains.annotations.NotNull p0: kotlin.jvm.functions.Function0): java.lang.Object + inner (anonymous) class TKt$sam$Sam$0 +} diff --git a/compiler/testData/codegen/bytecodeListing/sam/reusedSamWrapperClasses.txt b/compiler/testData/codegen/bytecodeListing/sam/reusedSamWrapperClasses.txt index 9a14226085a..d32cb99aa72 100644 --- a/compiler/testData/codegen/bytecodeListing/sam/reusedSamWrapperClasses.txt +++ b/compiler/testData/codegen/bytecodeListing/sam/reusedSamWrapperClasses.txt @@ -1,7 +1,7 @@ @kotlin.Metadata synthetic final class A$sam$java_lang_Runnable$0 { // source: 'reusedSamWrapperClasses.kt' - enclosing class A + enclosing method A.test1()V private synthetic final field function: kotlin.jvm.functions.Function0 inner (anonymous) class A$sam$java_lang_Runnable$0 method (p0: kotlin.jvm.functions.Function0): void diff --git a/compiler/testData/codegen/bytecodeListing/sam/reusedSamWrapperClasses_ir.txt b/compiler/testData/codegen/bytecodeListing/sam/reusedSamWrapperClasses_ir.txt new file mode 100644 index 00000000000..9a14226085a --- /dev/null +++ b/compiler/testData/codegen/bytecodeListing/sam/reusedSamWrapperClasses_ir.txt @@ -0,0 +1,50 @@ +@kotlin.Metadata +synthetic final class A$sam$java_lang_Runnable$0 { + // source: 'reusedSamWrapperClasses.kt' + enclosing class A + private synthetic final field function: kotlin.jvm.functions.Function0 + inner (anonymous) class A$sam$java_lang_Runnable$0 + method (p0: kotlin.jvm.functions.Function0): void + public synthetic final method run(): void +} + +@kotlin.Metadata +final class A$test1$f$1 { + // source: 'reusedSamWrapperClasses.kt' + enclosing method A.test1()V + public final static field INSTANCE: A$test1$f$1 + inner (anonymous) class A$test1$f$1 + static method (): void + method (): void + public synthetic bridge method invoke(): java.lang.Object + public final method invoke(): void +} + +@kotlin.Metadata +public final class A { + // source: 'reusedSamWrapperClasses.kt' + inner (anonymous) class A$sam$java_lang_Runnable$0 + inner (anonymous) class A$test1$f$1 + public method (): void + public final method test1(): void +} + +@kotlin.Metadata +final class B$test2$f$1 { + // source: 'reusedSamWrapperClasses.kt' + enclosing method B.test2()V + public final static field INSTANCE: B$test2$f$1 + inner (anonymous) class B$test2$f$1 + static method (): void + method (): void + public synthetic bridge method invoke(): java.lang.Object + public final method invoke(): void +} + +@kotlin.Metadata +public final class B { + // source: 'reusedSamWrapperClasses.kt' + inner (anonymous) class B$test2$f$1 + public method (): void + public final method test2(): void +} diff --git a/compiler/testData/codegen/bytecodeListing/sam/samAdapterAndInlinedOne.txt b/compiler/testData/codegen/bytecodeListing/sam/samAdapterAndInlinedOne.txt index 0d97548945f..8190a19b22d 100644 --- a/compiler/testData/codegen/bytecodeListing/sam/samAdapterAndInlinedOne.txt +++ b/compiler/testData/codegen/bytecodeListing/sam/samAdapterAndInlinedOne.txt @@ -3,7 +3,7 @@ public synthetic final class test/SamAdapterAndInlinedOneKt$sam$i$java_la // source: 'samAdapterAndInlinedOne.kt' public method (p0: kotlin.jvm.functions.Function0): void public synthetic final method run(): void - enclosing class test/SamAdapterAndInlinedOneKt + enclosing method test/SamAdapterAndInlinedOneKt.makeRunnable(Lkotlin/jvm/functions/Function0;)Ljava/lang/Runnable; private synthetic final field function: kotlin.jvm.functions.Function0 inner (anonymous) class test/SamAdapterAndInlinedOneKt$sam$i$java_lang_Runnable$0 } @@ -13,7 +13,7 @@ synthetic final class test/SamAdapterAndInlinedOneKt$sam$java_lang_Runnab // source: 'samAdapterAndInlinedOne.kt' method (p0: kotlin.jvm.functions.Function0): void public synthetic final method run(): void - enclosing class test/SamAdapterAndInlinedOneKt + enclosing method test/SamAdapterAndInlinedOneKt.noInline(Lkotlin/jvm/functions/Function0;)Ljava/lang/Runnable; private synthetic final field function: kotlin.jvm.functions.Function0 inner (anonymous) class test/SamAdapterAndInlinedOneKt$sam$java_lang_Runnable$0 } diff --git a/compiler/testData/codegen/bytecodeListing/sam/specializedFunInterface.txt b/compiler/testData/codegen/bytecodeListing/sam/specializedFunInterface.txt index 951fd16be77..81a5be6df37 100644 --- a/compiler/testData/codegen/bytecodeListing/sam/specializedFunInterface.txt +++ b/compiler/testData/codegen/bytecodeListing/sam/specializedFunInterface.txt @@ -12,7 +12,7 @@ synthetic final class TKt$sam$Sam$0 { public synthetic final method get(): java.lang.Object public method getFunctionDelegate(): kotlin.Function public method hashCode(): int - enclosing class TKt + enclosing method TKt.specializedSam(Lkotlin/jvm/functions/Function0;)Ljava/lang/String; private synthetic final field function: kotlin.jvm.functions.Function0 inner (anonymous) class TKt$sam$Sam$0 } diff --git a/compiler/testData/codegen/bytecodeListing/sam/specializedSamInterface.txt b/compiler/testData/codegen/bytecodeListing/sam/specializedSamInterface.txt index 1f0916f8e52..f5d8756817e 100644 --- a/compiler/testData/codegen/bytecodeListing/sam/specializedSamInterface.txt +++ b/compiler/testData/codegen/bytecodeListing/sam/specializedSamInterface.txt @@ -3,7 +3,7 @@ synthetic final class TKt$sam$Sam$0 { // source: 't.kt' method (p0: kotlin.jvm.functions.Function0): void public synthetic final method get(): java.lang.Object - enclosing class TKt + enclosing method TKt.specializedSam(Lkotlin/jvm/functions/Function0;)Ljava/lang/String; private synthetic final field function: kotlin.jvm.functions.Function0 inner (anonymous) class TKt$sam$Sam$0 } diff --git a/compiler/testData/codegen/bytecodeListing/sam/specializedSamInterface_ir.txt b/compiler/testData/codegen/bytecodeListing/sam/specializedSamInterface_ir.txt new file mode 100644 index 00000000000..1f0916f8e52 --- /dev/null +++ b/compiler/testData/codegen/bytecodeListing/sam/specializedSamInterface_ir.txt @@ -0,0 +1,16 @@ +@kotlin.Metadata +synthetic final class TKt$sam$Sam$0 { + // source: 't.kt' + method (p0: kotlin.jvm.functions.Function0): void + public synthetic final method get(): java.lang.Object + enclosing class TKt + private synthetic final field function: kotlin.jvm.functions.Function0 + inner (anonymous) class TKt$sam$Sam$0 +} + +@kotlin.Metadata +public final class TKt { + // source: 't.kt' + public final static <(Lkotlin/jvm/functions/Function0;)Ljava/lang/String;> method specializedSam(@org.jetbrains.annotations.NotNull p0: kotlin.jvm.functions.Function0): java.lang.String + inner (anonymous) class TKt$sam$Sam$0 +} diff --git a/compiler/testData/codegen/bytecodeListing/sam/wrapperInlinedFromAnotherClass.txt b/compiler/testData/codegen/bytecodeListing/sam/wrapperInlinedFromAnotherClass.txt index 5db6a593e54..64102a8aa4b 100644 --- a/compiler/testData/codegen/bytecodeListing/sam/wrapperInlinedFromAnotherClass.txt +++ b/compiler/testData/codegen/bytecodeListing/sam/wrapperInlinedFromAnotherClass.txt @@ -61,7 +61,7 @@ public final class B$runnable2$1 { @kotlin.Metadata public synthetic final class B$sam$i$java_lang_Runnable$0 { // source: 'wrapperInlinedFromAnotherClass.kt' - enclosing class B + enclosing method B.runnableSamCtor(Lkotlin/jvm/functions/Function0;)Ljava/lang/Runnable; private synthetic final field function: kotlin.jvm.functions.Function0 inner (anonymous) class B$sam$i$java_lang_Runnable$0 public method (p0: kotlin.jvm.functions.Function0): void diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/BlackBoxCodegenTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/BlackBoxCodegenTestGenerated.java index 4c0105ceeb8..d8c8c2f22d4 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/BlackBoxCodegenTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/BlackBoxCodegenTestGenerated.java @@ -15184,6 +15184,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { runTest("compiler/testData/codegen/box/funInterface/irrelevantPrivateDeclarations.kt"); } + @Test + @TestMetadata("kt44827_funInterface.kt") + public void testKt44827_funInterface() throws Exception { + runTest("compiler/testData/codegen/box/funInterface/kt44827_funInterface.kt"); + } + @Test @TestMetadata("multimodule.kt") public void testMultimodule() throws Exception { @@ -37074,6 +37080,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { runTest("compiler/testData/codegen/box/sam/kt31908.kt"); } + @Test + @TestMetadata("kt44827_sam.kt") + public void testKt44827_sam() throws Exception { + runTest("compiler/testData/codegen/box/sam/kt44827_sam.kt"); + } + @Test @TestMetadata("kt4753.kt") public void testKt4753() throws Exception { diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenTestGenerated.java index 0733afc90e8..ec33d560c1c 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenTestGenerated.java @@ -15184,6 +15184,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes runTest("compiler/testData/codegen/box/funInterface/irrelevantPrivateDeclarations.kt"); } + @Test + @TestMetadata("kt44827_funInterface.kt") + public void testKt44827_funInterface() throws Exception { + runTest("compiler/testData/codegen/box/funInterface/kt44827_funInterface.kt"); + } + @Test @TestMetadata("multimodule.kt") public void testMultimodule() throws Exception { @@ -37074,6 +37080,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes runTest("compiler/testData/codegen/box/sam/kt31908.kt"); } + @Test + @TestMetadata("kt44827_sam.kt") + public void testKt44827_sam() throws Exception { + runTest("compiler/testData/codegen/box/sam/kt44827_sam.kt"); + } + @Test @TestMetadata("kt4753.kt") public void testKt4753() throws Exception { diff --git a/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java b/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java index fb4b34cf653..c8c3f08f0d0 100644 --- a/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java +++ b/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java @@ -12550,6 +12550,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes runTest("compiler/testData/codegen/box/funInterface/irrelevantPrivateDeclarations.kt"); } + @TestMetadata("kt44827_funInterface.kt") + public void testKt44827_funInterface() throws Exception { + runTest("compiler/testData/codegen/box/funInterface/kt44827_funInterface.kt"); + } + @TestMetadata("multimodule.kt") public void testMultimodule() throws Exception { runTest("compiler/testData/codegen/box/funInterface/multimodule.kt"); @@ -29569,6 +29574,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes runTest("compiler/testData/codegen/box/sam/kt31908.kt"); } + @TestMetadata("kt44827_sam.kt") + public void testKt44827_sam() throws Exception { + runTest("compiler/testData/codegen/box/sam/kt44827_sam.kt"); + } + @TestMetadata("kt4753.kt") public void testKt4753() throws Exception { runTest("compiler/testData/codegen/box/sam/kt4753.kt");