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 53026982f9f..650df974025 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 @@ -44955,6 +44955,12 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT runTest("compiler/testData/codegen/box/sam/kt50477Enabled.kt"); } + @Test + @TestMetadata("kt52417.kt") + public void testKt52417() throws Exception { + runTest("compiler/testData/codegen/box/sam/kt52417.kt"); + } + @Test @TestMetadata("nonInlinedSamWrapper.kt") public void testNonInlinedSamWrapper() throws Exception { diff --git a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirBlackBoxInlineCodegenTestGenerated.java b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirBlackBoxInlineCodegenTestGenerated.java index 8babd873cf6..ae26ed3c336 100644 --- a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirBlackBoxInlineCodegenTestGenerated.java +++ b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirBlackBoxInlineCodegenTestGenerated.java @@ -2230,6 +2230,12 @@ public class FirBlackBoxInlineCodegenTestGenerated extends AbstractFirBlackBoxIn runTest("compiler/testData/codegen/boxInline/enclosingInfo/inlineChain2.kt"); } + @Test + @TestMetadata("kt52417.kt") + public void testKt52417() throws Exception { + runTest("compiler/testData/codegen/boxInline/enclosingInfo/kt52417.kt"); + } + @Test @TestMetadata("objectInInlineFun.kt") public void testObjectInInlineFun() throws Exception { diff --git a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxInlineCodegenTestGenerated.java b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxInlineCodegenTestGenerated.java index 04e7c74aaa3..d66b7288fc3 100644 --- a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxInlineCodegenTestGenerated.java +++ b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxInlineCodegenTestGenerated.java @@ -2230,6 +2230,12 @@ public class FirLightTreeBlackBoxInlineCodegenTestGenerated extends AbstractFirL runTest("compiler/testData/codegen/boxInline/enclosingInfo/inlineChain2.kt"); } + @Test + @TestMetadata("kt52417.kt") + public void testKt52417() throws Exception { + runTest("compiler/testData/codegen/boxInline/enclosingInfo/kt52417.kt"); + } + @Test @TestMetadata("objectInInlineFun.kt") public void testObjectInInlineFun() throws Exception { diff --git a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirSerializeCompileKotlinAgainstInlineKotlinTestGenerated.java b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirSerializeCompileKotlinAgainstInlineKotlinTestGenerated.java index d8f9aa1e0f9..3f43c4441f5 100644 --- a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirSerializeCompileKotlinAgainstInlineKotlinTestGenerated.java +++ b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirSerializeCompileKotlinAgainstInlineKotlinTestGenerated.java @@ -2230,6 +2230,12 @@ public class FirSerializeCompileKotlinAgainstInlineKotlinTestGenerated extends A runTest("compiler/testData/codegen/boxInline/enclosingInfo/inlineChain2.kt"); } + @Test + @TestMetadata("kt52417.kt") + public void testKt52417() throws Exception { + runTest("compiler/testData/codegen/boxInline/enclosingInfo/kt52417.kt"); + } + @Test @TestMetadata("objectInInlineFun.kt") public void testObjectInInlineFun() throws Exception { diff --git a/compiler/ir/backend.jvm/codegen/src/org/jetbrains/kotlin/backend/jvm/codegen/ExpressionCodegen.kt b/compiler/ir/backend.jvm/codegen/src/org/jetbrains/kotlin/backend/jvm/codegen/ExpressionCodegen.kt index 2fffea13474..f7270e87ad1 100644 --- a/compiler/ir/backend.jvm/codegen/src/org/jetbrains/kotlin/backend/jvm/codegen/ExpressionCodegen.kt +++ b/compiler/ir/backend.jvm/codegen/src/org/jetbrains/kotlin/backend/jvm/codegen/ExpressionCodegen.kt @@ -148,6 +148,12 @@ class ExpressionCodegen( var finallyDepth = 0 + val inlineRoot: ExpressionCodegen + get() = inlinedInto ?: this + + val enclosingFunctionForLocalObjects: IrFunction + get() = generateSequence(inlineRoot.irFunction) { context.enclosingMethodOverride[it] }.last() + val context = classCodegen.context val typeMapper = context.typeMapper val methodSignatureMapper = context.methodSignatureMapper @@ -862,7 +868,7 @@ class ExpressionCodegen( override fun visitClass(declaration: IrClass, data: BlockInfo): PromisedValue { if (declaration.origin != JvmLoweredDeclarationOrigin.CONTINUATION_CLASS) { - val childCodegen = ClassCodegen.getOrCreate(declaration, context, generateSequence(this) { it.inlinedInto }.last().irFunction) + val childCodegen = ClassCodegen.getOrCreate(declaration, context, enclosingFunctionForLocalObjects) childCodegen.generate() closureReifiedMarkers[declaration] = childCodegen.reifiedTypeParametersUsages } diff --git a/compiler/ir/backend.jvm/codegen/src/org/jetbrains/kotlin/backend/jvm/codegen/IrSourceCompilerForInline.kt b/compiler/ir/backend.jvm/codegen/src/org/jetbrains/kotlin/backend/jvm/codegen/IrSourceCompilerForInline.kt index 19a11a6a8ce..09034c817d3 100644 --- a/compiler/ir/backend.jvm/codegen/src/org/jetbrains/kotlin/backend/jvm/codegen/IrSourceCompilerForInline.kt +++ b/compiler/ir/backend.jvm/codegen/src/org/jetbrains/kotlin/backend/jvm/codegen/IrSourceCompilerForInline.kt @@ -42,12 +42,16 @@ class IrSourceCompilerForInline( override val inlineCallSiteInfo: InlineCallSiteInfo get() { - val root = generateSequence(codegen) { it.inlinedInto }.last() + val root = codegen.inlineRoot + val rootFunction = root.enclosingFunctionForLocalObjects return InlineCallSiteInfo( root.classCodegen.type.internalName, - root.signature.asmMethod, - root.irFunction.inlineScopeVisibility, - root.irFunction.fileParent.getIoFile(), + if (rootFunction === root.irFunction) + root.signature.asmMethod + else + codegen.methodSignatureMapper.mapAsmMethod(rootFunction), + rootFunction.inlineScopeVisibility, + rootFunction.fileParent.getIoFile(), callElement.psiElement?.let { CodegenUtil.getLineNumberForElement(it, false) } ?: 0 ) } @@ -62,7 +66,7 @@ class IrSourceCompilerForInline( reifiedTypeParameters.addUsedReifiedParameter(typeParameter.name.asString()) } } - return FunctionCodegen(lambdaInfo.function, codegen.classCodegen).generate(codegen, reifiedTypeParameters) + return FunctionCodegen(lambdaInfo.function, codegen.classCodegen).generate(codegen.inlineRoot, reifiedTypeParameters) } override fun compileInlineFunction(jvmSignature: JvmMethodSignature): SMAPAndMethodNode { diff --git a/compiler/ir/backend.jvm/lower/src/org/jetbrains/kotlin/backend/jvm/JvmLower.kt b/compiler/ir/backend.jvm/lower/src/org/jetbrains/kotlin/backend/jvm/JvmLower.kt index 0aad442091e..23cb79c3e19 100644 --- a/compiler/ir/backend.jvm/lower/src/org/jetbrains/kotlin/backend/jvm/JvmLower.kt +++ b/compiler/ir/backend.jvm/lower/src/org/jetbrains/kotlin/backend/jvm/JvmLower.kt @@ -367,6 +367,7 @@ private val jvmFilePhases = listOf( jvmSafeCallFoldingPhase, jvmOptimizationLoweringPhase, additionalClassAnnotationPhase, + recordEnclosingMethodsPhase, typeOperatorLowering, replaceKFunctionInvokeWithFunctionInvokePhase, kotlinNothingValueExceptionPhase, diff --git a/compiler/ir/backend.jvm/lower/src/org/jetbrains/kotlin/backend/jvm/lower/RecordEnclosingMethodsLowering.kt b/compiler/ir/backend.jvm/lower/src/org/jetbrains/kotlin/backend/jvm/lower/RecordEnclosingMethodsLowering.kt new file mode 100644 index 00000000000..2268d84773d --- /dev/null +++ b/compiler/ir/backend.jvm/lower/src/org/jetbrains/kotlin/backend/jvm/lower/RecordEnclosingMethodsLowering.kt @@ -0,0 +1,64 @@ +/* + * Copyright 2010-2022 JetBrains s.r.o. and Kotlin Programming Language contributors. + * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. + */ + +package org.jetbrains.kotlin.backend.jvm.lower + +import org.jetbrains.kotlin.backend.common.FileLoweringPass +import org.jetbrains.kotlin.backend.common.phaser.makeIrFilePhase +import org.jetbrains.kotlin.backend.jvm.JvmBackendContext +import org.jetbrains.kotlin.backend.jvm.ir.isInlineFunctionCall +import org.jetbrains.kotlin.backend.jvm.ir.unwrapInlineLambda +import org.jetbrains.kotlin.ir.IrElement +import org.jetbrains.kotlin.ir.declarations.IrConstructor +import org.jetbrains.kotlin.ir.declarations.IrFile +import org.jetbrains.kotlin.ir.declarations.IrFunction +import org.jetbrains.kotlin.ir.expressions.IrFunctionAccessExpression +import org.jetbrains.kotlin.ir.expressions.IrFunctionReference +import org.jetbrains.kotlin.ir.util.isLambda +import org.jetbrains.kotlin.ir.util.parentAsClass +import org.jetbrains.kotlin.ir.util.primaryConstructor +import org.jetbrains.kotlin.ir.util.render +import org.jetbrains.kotlin.ir.visitors.IrElementVisitor + +internal val recordEnclosingMethodsPhase = makeIrFilePhase( + ::RecordEnclosingMethodsLowering, + name = "RecordEnclosingMethods", + description = "Find enclosing methods for objects inside inline and dynamic lambdas" +) + +private class RecordEnclosingMethodsLowering(val context: JvmBackendContext) : FileLoweringPass { + override fun lower(irFile: IrFile) = + irFile.accept(object : IrElementVisitor { + override fun visitElement(element: IrElement, data: IrFunction?) = + element.acceptChildren(this, element as? IrFunction ?: data) + + override fun visitFunctionAccess(expression: IrFunctionAccessExpression, data: IrFunction?) { + require(data != null) { "function call not in a method: ${expression.render()}" } + when { + expression.symbol == context.ir.symbols.indyLambdaMetafactoryIntrinsic -> { + val reference = expression.getValueArgument(1) + if (reference is IrFunctionReference && reference.origin.isLambda) { + recordEnclosingMethodOverride(reference.symbol.owner, data) + } + } + expression.symbol.owner.isInlineFunctionCall(context) -> { + for (parameter in expression.symbol.owner.valueParameters) { + val lambda = expression.getValueArgument(parameter.index)?.unwrapInlineLambda() ?: continue + recordEnclosingMethodOverride(lambda.symbol.owner, data) + } + } + } + return super.visitFunctionAccess(expression, data) + } + + private fun recordEnclosingMethodOverride(from: IrFunction, to: IrFunction) = + context.enclosingMethodOverride.merge(from, to) { old, new -> + // A single lambda can be referenced multiple times if it is in a field initializer + // or an anonymous initializer block and there are multiple non-delegating constructors. + assert(old.parentAsClass == new.parentAsClass && old is IrConstructor && new is IrConstructor) + old.parentAsClass.primaryConstructor ?: old + } + }, null) +} diff --git a/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/JvmBackendContext.kt b/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/JvmBackendContext.kt index 99e68df8a81..dc07a2f6f71 100644 --- a/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/JvmBackendContext.kt +++ b/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/JvmBackendContext.kt @@ -99,6 +99,7 @@ class JvmBackendContext( } val isEnclosedInConstructor = ConcurrentHashMap.newKeySet() + val enclosingMethodOverride = ConcurrentHashMap() private val classCodegens = ConcurrentHashMap() diff --git a/compiler/testData/codegen/box/sam/kt52417.kt b/compiler/testData/codegen/box/sam/kt52417.kt new file mode 100644 index 00000000000..d2fdd08828a --- /dev/null +++ b/compiler/testData/codegen/box/sam/kt52417.kt @@ -0,0 +1,18 @@ +// TARGET_BACKEND: JVM +// WITH_RUNTIME +// WITH_STDLIB +package test + +abstract class TypeToken + +fun interface I { + fun foo(): String +} + +fun foo() = + I { + (object : TypeToken() {})::class.java.genericSuperclass.toString() + }.foo() + +fun box(): String = + foo().let { if (it == "test.TypeToken") "OK" else it } diff --git a/compiler/testData/codegen/boxInline/enclosingInfo/kt52417.kt b/compiler/testData/codegen/boxInline/enclosingInfo/kt52417.kt new file mode 100644 index 00000000000..fe98915bec9 --- /dev/null +++ b/compiler/testData/codegen/boxInline/enclosingInfo/kt52417.kt @@ -0,0 +1,28 @@ +// TARGET_BACKEND: JVM +// WITH_RUNTIME +// WITH_STDLIB +// FILE: 1.kt +package test + +abstract class TypeToken + +// Although V is not reified, if the object happens to be regenerated, V will be replaced with its value in signatures +inline fun typeTokenOf(crossinline forceRegeneration: () -> Unit = {}) = + object : TypeToken() { + fun unused() = forceRegeneration() + } + +// FILE: 2.kt +import test.* + +fun interface I { + fun foo(): String +} + +fun foo() = + I { + typeTokenOf()::class.java.genericSuperclass.toString() + }.foo() + +fun box(): String = + foo().let { if (it == "test.TypeToken") "OK" else it } 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 592b0dfb4cc..063048b7f5e 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 @@ -44391,6 +44391,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { runTest("compiler/testData/codegen/box/sam/kt50171.kt"); } + @Test + @TestMetadata("kt52417.kt") + public void testKt52417() throws Exception { + runTest("compiler/testData/codegen/box/sam/kt52417.kt"); + } + @Test @TestMetadata("nonInlinedSamWrapper.kt") public void testNonInlinedSamWrapper() throws Exception { diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/BlackBoxInlineCodegenTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/BlackBoxInlineCodegenTestGenerated.java index 69237c6b3b3..2c627d69998 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/BlackBoxInlineCodegenTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/BlackBoxInlineCodegenTestGenerated.java @@ -2230,6 +2230,12 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo runTest("compiler/testData/codegen/boxInline/enclosingInfo/inlineChain2.kt"); } + @Test + @TestMetadata("kt52417.kt") + public void testKt52417() throws Exception { + runTest("compiler/testData/codegen/boxInline/enclosingInfo/kt52417.kt"); + } + @Test @TestMetadata("objectInInlineFun.kt") public void testObjectInInlineFun() throws Exception { diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/CompileKotlinAgainstInlineKotlinTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/CompileKotlinAgainstInlineKotlinTestGenerated.java index be43efe9531..632b84757af 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/CompileKotlinAgainstInlineKotlinTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/CompileKotlinAgainstInlineKotlinTestGenerated.java @@ -2230,6 +2230,12 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi runTest("compiler/testData/codegen/boxInline/enclosingInfo/inlineChain2.kt"); } + @Test + @TestMetadata("kt52417.kt") + public void testKt52417() throws Exception { + runTest("compiler/testData/codegen/boxInline/enclosingInfo/kt52417.kt"); + } + @Test @TestMetadata("objectInInlineFun.kt") public void testObjectInInlineFun() 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 d5f71e7a3ac..2487fdea880 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 @@ -44955,6 +44955,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes runTest("compiler/testData/codegen/box/sam/kt50477Enabled.kt"); } + @Test + @TestMetadata("kt52417.kt") + public void testKt52417() throws Exception { + runTest("compiler/testData/codegen/box/sam/kt52417.kt"); + } + @Test @TestMetadata("nonInlinedSamWrapper.kt") public void testNonInlinedSamWrapper() throws Exception { diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxInlineCodegenTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxInlineCodegenTestGenerated.java index c1225a4723c..4d610ded453 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxInlineCodegenTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxInlineCodegenTestGenerated.java @@ -2230,6 +2230,12 @@ public class IrBlackBoxInlineCodegenTestGenerated extends AbstractIrBlackBoxInli runTest("compiler/testData/codegen/boxInline/enclosingInfo/inlineChain2.kt"); } + @Test + @TestMetadata("kt52417.kt") + public void testKt52417() throws Exception { + runTest("compiler/testData/codegen/boxInline/enclosingInfo/kt52417.kt"); + } + @Test @TestMetadata("objectInInlineFun.kt") public void testObjectInInlineFun() throws Exception { diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrCompileKotlinAgainstInlineKotlinTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrCompileKotlinAgainstInlineKotlinTestGenerated.java index 3dbcd236641..904c5a7e89f 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrCompileKotlinAgainstInlineKotlinTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrCompileKotlinAgainstInlineKotlinTestGenerated.java @@ -2230,6 +2230,12 @@ public class IrCompileKotlinAgainstInlineKotlinTestGenerated extends AbstractIrC runTest("compiler/testData/codegen/boxInline/enclosingInfo/inlineChain2.kt"); } + @Test + @TestMetadata("kt52417.kt") + public void testKt52417() throws Exception { + runTest("compiler/testData/codegen/boxInline/enclosingInfo/kt52417.kt"); + } + @Test @TestMetadata("objectInInlineFun.kt") public void testObjectInInlineFun() throws Exception { diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrSerializeCompileKotlinAgainstInlineKotlinTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrSerializeCompileKotlinAgainstInlineKotlinTestGenerated.java index 4633fecfd66..3179b5e6964 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrSerializeCompileKotlinAgainstInlineKotlinTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrSerializeCompileKotlinAgainstInlineKotlinTestGenerated.java @@ -2230,6 +2230,12 @@ public class IrSerializeCompileKotlinAgainstInlineKotlinTestGenerated extends Ab runTest("compiler/testData/codegen/boxInline/enclosingInfo/inlineChain2.kt"); } + @Test + @TestMetadata("kt52417.kt") + public void testKt52417() throws Exception { + runTest("compiler/testData/codegen/boxInline/enclosingInfo/kt52417.kt"); + } + @Test @TestMetadata("objectInInlineFun.kt") public void testObjectInInlineFun() throws Exception { diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/JvmIrAgainstOldBoxInlineTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/JvmIrAgainstOldBoxInlineTestGenerated.java index f8a6587a9df..a2f2c5c0a95 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/JvmIrAgainstOldBoxInlineTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/JvmIrAgainstOldBoxInlineTestGenerated.java @@ -2230,6 +2230,12 @@ public class JvmIrAgainstOldBoxInlineTestGenerated extends AbstractJvmIrAgainstO runTest("compiler/testData/codegen/boxInline/enclosingInfo/inlineChain2.kt"); } + @Test + @TestMetadata("kt52417.kt") + public void testKt52417() throws Exception { + runTest("compiler/testData/codegen/boxInline/enclosingInfo/kt52417.kt"); + } + @Test @TestMetadata("objectInInlineFun.kt") public void testObjectInInlineFun() throws Exception { diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/JvmOldAgainstIrBoxInlineTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/JvmOldAgainstIrBoxInlineTestGenerated.java index 6be0fe19ac8..f655f68cdae 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/JvmOldAgainstIrBoxInlineTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/JvmOldAgainstIrBoxInlineTestGenerated.java @@ -2230,6 +2230,12 @@ public class JvmOldAgainstIrBoxInlineTestGenerated extends AbstractJvmOldAgainst runTest("compiler/testData/codegen/boxInline/enclosingInfo/inlineChain2.kt"); } + @Test + @TestMetadata("kt52417.kt") + public void testKt52417() throws Exception { + runTest("compiler/testData/codegen/boxInline/enclosingInfo/kt52417.kt"); + } + @Test @TestMetadata("objectInInlineFun.kt") public void testObjectInInlineFun() 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 e6584179325..0ae89d9e942 100644 --- a/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java +++ b/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java @@ -35870,6 +35870,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes runTest("compiler/testData/codegen/box/sam/kt50171.kt"); } + @TestMetadata("kt52417.kt") + public void testKt52417() throws Exception { + runTest("compiler/testData/codegen/box/sam/kt52417.kt"); + } + @TestMetadata("nonInlinedSamWrapper.kt") public void testNonInlinedSamWrapper() throws Exception { runTest("compiler/testData/codegen/box/sam/nonInlinedSamWrapper.kt");