From 66d8f471d91abe70458d3d5ddc6257469f80d239 Mon Sep 17 00:00:00 2001 From: "Denis.Zharkov" Date: Mon, 29 Jan 2024 15:17:04 +0100 Subject: [PATCH] K2: Fix internal error in FIR2IR caused by PCLA + String interpolation There's an implicit contract in PCLA that the statement-level call should be postponed iff it has something to be postponed inside. And that contract didn't work well for string interpolation containing some postponed calls. Thus, we haven't run a completion results writing for them properly, thus leaving type parameters (K from synthetic call) for expression types instead of an inferred substituted type. In this commit, the contract was reversed to explicitly enumerate the cases when it's safe to resolve the candidate outside PCLA session. See the comments at `mightBeAnalyzedAndCompletedIndependently`. ^KT-65341 Fixed --- ...LFirBlackBoxCodegenBasedTestGenerated.java | 12 ++ ...rsedBlackBoxCodegenBasedTestGenerated.java | 12 ++ ...LightTreeBlackBoxCodegenTestGenerated.java | 12 ++ ...hIrFakeOverrideGeneratorTestGenerated.java | 12 ++ .../FirPsiBlackBoxCodegenTestGenerated.java | 12 ++ .../inference/FirPCLAInferenceSession.kt | 153 ++++++++++-------- .../box/builderInference/kt65341.jvm_abi.txt | 10 ++ .../codegen/box/builderInference/kt65341.kt | 24 +++ ...ptonedPCLACallInsideStringInterpolation.kt | 44 +++++ ...LACallInsideStringInterpolation.fir.ir.txt | 54 ------- ...LACallInsideStringInterpolation.fir.kt.txt | 29 ---- ...ptonedPCLACallInsideStringInterpolation.kt | 1 + .../JvmAbiConsistencyTestBoxGenerated.java | 12 ++ .../codegen/BlackBoxCodegenTestGenerated.java | 12 ++ .../IrBlackBoxCodegenTestGenerated.java | 12 ++ ...kBoxCodegenWithIrInlinerTestGenerated.java | 12 ++ .../LightAnalysisModeTestGenerated.java | 10 ++ .../fir/FirJsCodegenBoxTestGenerated.java | 6 + .../fir/FirJsES6CodegenBoxTestGenerated.java | 6 + .../test/ir/IrJsCodegenBoxTestGenerated.java | 6 + .../ir/IrJsES6CodegenBoxTestGenerated.java | 6 + .../FirNativeCodegenBoxTestGenerated.java | 6 + .../FirNativeCodegenBoxTestNoPLGenerated.java | 6 + .../NativeCodegenBoxTestGenerated.java | 6 + .../NativeCodegenBoxTestNoPLGenerated.java | 6 + .../FirWasmJsCodegenBoxTestGenerated.java | 6 + .../test/K1WasmCodegenBoxTestGenerated.java | 6 + 27 files changed, 346 insertions(+), 147 deletions(-) create mode 100644 compiler/testData/codegen/box/builderInference/kt65341.jvm_abi.txt create mode 100644 compiler/testData/codegen/box/builderInference/kt65341.kt create mode 100644 compiler/testData/codegen/box/builderInference/posptonedPCLACallInsideStringInterpolation.kt delete mode 100644 compiler/testData/ir/irText/expressions/posptonedPCLACallInsideStringInterpolation.fir.ir.txt delete mode 100644 compiler/testData/ir/irText/expressions/posptonedPCLACallInsideStringInterpolation.fir.kt.txt diff --git a/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/LLFirBlackBoxCodegenBasedTestGenerated.java b/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/LLFirBlackBoxCodegenBasedTestGenerated.java index c5d9ad33332..89c0ec9a8c3 100644 --- a/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/LLFirBlackBoxCodegenBasedTestGenerated.java +++ b/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/LLFirBlackBoxCodegenBasedTestGenerated.java @@ -2772,6 +2772,12 @@ public class LLFirBlackBoxCodegenBasedTestGenerated extends AbstractLLFirBlackBo KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/builderInference"), Pattern.compile("^(.+)\\.kt$"), null, true); } + @Test + @TestMetadata("kt65341.kt") + public void testKt65341() throws Exception { + runTest("compiler/testData/codegen/box/builderInference/kt65341.kt"); + } + @Test @TestMetadata("lambdaParameterHasTVType.kt") public void testLambdaParameterHasTVType() throws Exception { @@ -2802,6 +2808,12 @@ public class LLFirBlackBoxCodegenBasedTestGenerated extends AbstractLLFirBlackBo runTest("compiler/testData/codegen/box/builderInference/pclaRootIsTrySyntheticCall.kt"); } + @Test + @TestMetadata("posptonedPCLACallInsideStringInterpolation.kt") + public void testPosptonedPCLACallInsideStringInterpolation() throws Exception { + runTest("compiler/testData/codegen/box/builderInference/posptonedPCLACallInsideStringInterpolation.kt"); + } + @Test @TestMetadata("receiverUsesOuterTVButReturnTypeIsProper.kt") public void testReceiverUsesOuterTVButReturnTypeIsProper() throws Exception { diff --git a/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/LLFirReversedBlackBoxCodegenBasedTestGenerated.java b/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/LLFirReversedBlackBoxCodegenBasedTestGenerated.java index 73d3bd387eb..d42cf4e3f7d 100644 --- a/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/LLFirReversedBlackBoxCodegenBasedTestGenerated.java +++ b/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/LLFirReversedBlackBoxCodegenBasedTestGenerated.java @@ -2772,6 +2772,12 @@ public class LLFirReversedBlackBoxCodegenBasedTestGenerated extends AbstractLLFi KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/builderInference"), Pattern.compile("^(.+)\\.kt$"), null, true); } + @Test + @TestMetadata("kt65341.kt") + public void testKt65341() throws Exception { + runTest("compiler/testData/codegen/box/builderInference/kt65341.kt"); + } + @Test @TestMetadata("lambdaParameterHasTVType.kt") public void testLambdaParameterHasTVType() throws Exception { @@ -2802,6 +2808,12 @@ public class LLFirReversedBlackBoxCodegenBasedTestGenerated extends AbstractLLFi runTest("compiler/testData/codegen/box/builderInference/pclaRootIsTrySyntheticCall.kt"); } + @Test + @TestMetadata("posptonedPCLACallInsideStringInterpolation.kt") + public void testPosptonedPCLACallInsideStringInterpolation() throws Exception { + runTest("compiler/testData/codegen/box/builderInference/posptonedPCLACallInsideStringInterpolation.kt"); + } + @Test @TestMetadata("receiverUsesOuterTVButReturnTypeIsProper.kt") public void testReceiverUsesOuterTVButReturnTypeIsProper() throws Exception { diff --git a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxCodegenTestGenerated.java b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxCodegenTestGenerated.java index 2185378715b..23286943f34 100644 --- a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxCodegenTestGenerated.java +++ b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxCodegenTestGenerated.java @@ -2755,6 +2755,12 @@ public class FirLightTreeBlackBoxCodegenTestGenerated extends AbstractFirLightTr KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/builderInference"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test + @TestMetadata("kt65341.kt") + public void testKt65341() throws Exception { + runTest("compiler/testData/codegen/box/builderInference/kt65341.kt"); + } + @Test @TestMetadata("lambdaParameterHasTVType.kt") public void testLambdaParameterHasTVType() throws Exception { @@ -2785,6 +2791,12 @@ public class FirLightTreeBlackBoxCodegenTestGenerated extends AbstractFirLightTr runTest("compiler/testData/codegen/box/builderInference/pclaRootIsTrySyntheticCall.kt"); } + @Test + @TestMetadata("posptonedPCLACallInsideStringInterpolation.kt") + public void testPosptonedPCLACallInsideStringInterpolation() throws Exception { + runTest("compiler/testData/codegen/box/builderInference/posptonedPCLACallInsideStringInterpolation.kt"); + } + @Test @TestMetadata("receiverUsesOuterTVButReturnTypeIsProper.kt") public void testReceiverUsesOuterTVButReturnTypeIsProper() throws Exception { diff --git a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxCodegenWithIrFakeOverrideGeneratorTestGenerated.java b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxCodegenWithIrFakeOverrideGeneratorTestGenerated.java index d447359f533..850cf7bcf2e 100644 --- a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxCodegenWithIrFakeOverrideGeneratorTestGenerated.java +++ b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxCodegenWithIrFakeOverrideGeneratorTestGenerated.java @@ -2755,6 +2755,12 @@ public class FirLightTreeBlackBoxCodegenWithIrFakeOverrideGeneratorTestGenerated KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/builderInference"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test + @TestMetadata("kt65341.kt") + public void testKt65341() throws Exception { + runTest("compiler/testData/codegen/box/builderInference/kt65341.kt"); + } + @Test @TestMetadata("lambdaParameterHasTVType.kt") public void testLambdaParameterHasTVType() throws Exception { @@ -2785,6 +2791,12 @@ public class FirLightTreeBlackBoxCodegenWithIrFakeOverrideGeneratorTestGenerated runTest("compiler/testData/codegen/box/builderInference/pclaRootIsTrySyntheticCall.kt"); } + @Test + @TestMetadata("posptonedPCLACallInsideStringInterpolation.kt") + public void testPosptonedPCLACallInsideStringInterpolation() throws Exception { + runTest("compiler/testData/codegen/box/builderInference/posptonedPCLACallInsideStringInterpolation.kt"); + } + @Test @TestMetadata("receiverUsesOuterTVButReturnTypeIsProper.kt") public void testReceiverUsesOuterTVButReturnTypeIsProper() throws Exception { diff --git a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirPsiBlackBoxCodegenTestGenerated.java b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirPsiBlackBoxCodegenTestGenerated.java index 397523885d9..f5ea6ea0d46 100644 --- a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirPsiBlackBoxCodegenTestGenerated.java +++ b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirPsiBlackBoxCodegenTestGenerated.java @@ -2755,6 +2755,12 @@ public class FirPsiBlackBoxCodegenTestGenerated extends AbstractFirPsiBlackBoxCo KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/builderInference"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test + @TestMetadata("kt65341.kt") + public void testKt65341() throws Exception { + runTest("compiler/testData/codegen/box/builderInference/kt65341.kt"); + } + @Test @TestMetadata("lambdaParameterHasTVType.kt") public void testLambdaParameterHasTVType() throws Exception { @@ -2785,6 +2791,12 @@ public class FirPsiBlackBoxCodegenTestGenerated extends AbstractFirPsiBlackBoxCo runTest("compiler/testData/codegen/box/builderInference/pclaRootIsTrySyntheticCall.kt"); } + @Test + @TestMetadata("posptonedPCLACallInsideStringInterpolation.kt") + public void testPosptonedPCLACallInsideStringInterpolation() throws Exception { + runTest("compiler/testData/codegen/box/builderInference/posptonedPCLACallInsideStringInterpolation.kt"); + } + @Test @TestMetadata("receiverUsesOuterTVButReturnTypeIsProper.kt") public void testReceiverUsesOuterTVButReturnTypeIsProper() throws Exception { diff --git a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/inference/FirPCLAInferenceSession.kt b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/inference/FirPCLAInferenceSession.kt index c99f60ff044..57cf16adfe3 100644 --- a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/inference/FirPCLAInferenceSession.kt +++ b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/inference/FirPCLAInferenceSession.kt @@ -8,15 +8,13 @@ package org.jetbrains.kotlin.fir.resolve.inference import org.jetbrains.kotlin.fir.FirElement import org.jetbrains.kotlin.fir.expressions.* import org.jetbrains.kotlin.fir.resolve.ResolutionMode -import org.jetbrains.kotlin.fir.resolve.calls.CallKind import org.jetbrains.kotlin.fir.resolve.calls.Candidate import org.jetbrains.kotlin.fir.resolve.calls.candidate -import org.jetbrains.kotlin.fir.resolve.calls.processConstraintStorageFromExpression import org.jetbrains.kotlin.fir.resolve.inference.model.ConeExpectedTypeConstraintPosition import org.jetbrains.kotlin.fir.resolve.inference.model.ConeFixVariableConstraintPosition import org.jetbrains.kotlin.fir.resolve.substitution.ConeSubstitutor import org.jetbrains.kotlin.fir.resolve.transformers.ReturnTypeCalculator -import org.jetbrains.kotlin.fir.symbols.impl.FirVariableSymbol +import org.jetbrains.kotlin.fir.symbols.impl.FirCallableSymbol import org.jetbrains.kotlin.fir.types.* import org.jetbrains.kotlin.fir.visitors.FirDefaultTransformer import org.jetbrains.kotlin.resolve.calls.inference.addSubtypeConstraintIfCompatible @@ -38,8 +36,9 @@ class FirPCLAInferenceSession( private set override fun baseConstraintStorageForCandidate(candidate: Candidate): ConstraintStorage? { - if (candidate.needsToBePostponed()) return currentCommonSystem.currentStorage() - return null + if (candidate.mightBeAnalyzedAndCompletedIndependently()) return null + + return currentCommonSystem.currentStorage() } override fun customCompletionModeInsteadOfFull( @@ -191,56 +190,97 @@ class FirPCLAInferenceSession( return Pair(coneTypeVariableTypeConstructor, resultType) } - private fun FirExpression.doesArgumentLeadToCallPostponement(): Boolean { - if (this is FirWrappedArgumentExpression) return expression.doesArgumentLeadToCallPostponement() + /** + * This function returns true only when it's safe & sound to analyze and complete the candidate outside the PCLA context, + * i.e., independently of outer CS. + * + * That might be some plain variable accesses that do not contain type variables or regular function calls with only trivial arguments. + * + * The basic purpose of that function is performance enhancement because resolving all the calls inside PCLA lambda in the outer context + * might be too much. + * + * Mostly, that means that this function might always return false and it should be correct. + * TODO: Currently, making it always returning "false" leads to few test failures + * TODO: due to some corner cases like annotations calls (KT-65465) + */ + private fun Candidate.mightBeAnalyzedAndCompletedIndependently(): Boolean { + when (callInfo.resolutionMode) { + // Currently, we handle delegates specifically, not completing them even if they are trivial function calls + // Thus they are being resolved in the context of outer CS + is ResolutionMode.Delegate -> return false + is ResolutionMode.WithExpectedType -> when { + // For assignments like myVarContainingTV = SomeCallWithNonTrivialInference(...) + // We should integrate even simple calls into the PCLA tree, too + callInfo.resolutionMode.expectedTypeRef.type.containsNotFixedTypeVariables() -> return false + } + is ResolutionMode.WithStatus, is ResolutionMode.LambdaResolution -> + error("$this call should not be analyzed in ${callInfo.resolutionMode}") - if (doesArgumentUseOuterCS()) return true - if (isQualifiedAccessContainingTypeVariables()) return true - - // Postponed atoms - if (this is FirAnonymousFunctionExpression) return true - if (this is FirCallableReferenceAccess) return true - if (this is FirAnonymousObjectExpression) return true - - return false - } - - private fun Candidate.needsToBePostponed(): Boolean { - if (dispatchReceiver?.isReceiverPostponed() == true) return true - if (givenExtensionReceiverOptions.any { it.isReceiverPostponed() }) return true - - if (callInfo.arguments.any { it.doesArgumentLeadToCallPostponement() }) return true - - if (callInfo.callKind == CallKind.VariableAccess) { - val returnType = (symbol as? FirVariableSymbol)?.let(returnTypeCalculator::tryCalculateReturnType) - if (returnType?.type?.containsNotFixedTypeVariables() == true) return true - } - - if (callInfo.resolutionMode is ResolutionMode.Delegate) return true - - // For assignments like myVarContainingTV = SomeCallWithNonTrivialInference(...) - // We should integrate the call into the PCLA tree, too - if ((callInfo.resolutionMode as? ResolutionMode.WithExpectedType)?.expectedTypeRef?.type?.containsNotFixedTypeVariables() == true) { - return true - } - - // Synthetic calls with blocks work like lambdas - if (callInfo.callKind == CallKind.SyntheticSelect) return true - - return false - } - - private fun FirExpression.doesArgumentUseOuterCS(): Boolean { - var result = false - processConstraintStorageFromExpression(this) { - if (it.usesOuterCs) { - result = true + is ResolutionMode.AssignmentLValue, + is ResolutionMode.ContextDependent, + is ResolutionMode.ContextIndependent, + is ResolutionMode.ReceiverResolution, + -> { + // Regular cases, just continue execution. + // Enumerating all the cases just to make sure we don't forget to handle some mode. } } - return result + val callSite = callInfo.callSite + // Annotation calls and collection literals (allowed only inside annotations) + // should be completed independently since that can't somehow affect PCLA + if (callSite is FirAnnotationCall || callSite is FirArrayLiteral) return true + + // I'd say that this might be an assertion, but let's do an early return + if (callSite !is FirResolvable && callSite !is FirVariableAssignment) return false + + // We can't analyze independently the calls which have postponed receivers + // Even if the calls themselves are trivial + if (dispatchReceiver?.isReceiverPostponed() == true) return false + if (givenExtensionReceiverOptions.any { it.isReceiverPostponed() }) return false + + // Accesses to local variables or local functions which return types contain not fixed TVs + val returnType = (symbol as? FirCallableSymbol)?.let(returnTypeCalculator::tryCalculateReturnType) + if (returnType?.type?.containsNotFixedTypeVariables() == true) return false + + // Now, we've got some sort of call/variable access/callable reference/synthetic call (see hierarchy of FirResolvable) + // It has regular independent receivers and trivial return type + // The only thing we need to check if it has only trivial arguments + if (callInfo.arguments.any { !it.isTrivialArgument() }) return false + + return true } + private fun FirExpression.isTrivialArgument(): Boolean = + when (this) { + // Callable references might be unresolved at this stage, so obtaining `resolvedType` would lead to exceptions + // Anyway, they should lead to integrated resolution of containing call + is FirCallableReferenceAccess -> false + + is FirResolvable -> when (val candidate = candidate()) { + null -> !resolvedType.containsNotFixedTypeVariables() + else -> !candidate.usedOuterCs + } + + is FirWrappedExpression -> expression.isTrivialArgument() + is FirSamConversionExpression -> expression.isTrivialArgument() + is FirSmartCastExpression -> originalExpression.isTrivialArgument() + + is FirCall -> argumentList.arguments.all { it.isTrivialArgument() } + + is FirBinaryLogicExpression -> leftOperand.isTrivialArgument() && rightOperand.isTrivialArgument() + is FirComparisonExpression -> compareToCall.isTrivialArgument() + + is FirCheckedSafeCallSubject -> originalReceiverRef.value.isTrivialArgument() + is FirSafeCallExpression -> receiver.isTrivialArgument() && (selector as? FirExpression)?.isTrivialArgument() == true + is FirVarargArgumentsExpression -> arguments.all { it.isTrivialArgument() } + + is FirLiteralExpression<*>, is FirResolvedQualifier, is FirResolvedReifiedParameterReference -> true + + // Be default, we consider all the unknown cases as unsafe to resolve independently + else -> false + } + private fun FirExpression.isReceiverPostponed(): Boolean { if (resolvedType.containsNotFixedTypeVariables()) return true if ((this as? FirResolvable)?.candidate()?.usedOuterCs == true) return true @@ -248,21 +288,6 @@ class FirPCLAInferenceSession( return false } - private fun FirExpression.isQualifiedAccessContainingTypeVariables(): Boolean { - if (this is FirNamedArgumentExpression) return expression.isQualifiedAccessContainingTypeVariables() - - if (!isQualifiedAccessOrSmartCastOnIt()) return false - if (this is FirCallableReferenceAccess) return false - - return resolvedType.containsNotFixedTypeVariables() && (this as? FirResolvable)?.candidate() == null - } - - private fun FirExpression.isQualifiedAccessOrSmartCastOnIt(): Boolean = when (this) { - is FirQualifiedAccessExpression -> true - is FirSmartCastExpression -> originalExpression.isQualifiedAccessOrSmartCastOnIt() - else -> false - } - private fun ConeKotlinType.containsNotFixedTypeVariables(): Boolean = contains { // TODO: Investigate why using `notFixedTypeVariables` instead of `allTypeVariables` leads to failure of the test (KT-64861) diff --git a/compiler/testData/codegen/box/builderInference/kt65341.jvm_abi.txt b/compiler/testData/codegen/box/builderInference/kt65341.jvm_abi.txt new file mode 100644 index 00000000000..801fd9349de --- /dev/null +++ b/compiler/testData/codegen/box/builderInference/kt65341.jvm_abi.txt @@ -0,0 +1,10 @@ +MODULE main + CLASS Kt65341Kt$nodeTransformer$1.class + K1 + --- + K2 + invoke(LNodeTransformer1;)Lkotlin/Unit; [public, final] + K1 + invoke(LNodeTransformer1;)V [public, final] + K2 + --- diff --git a/compiler/testData/codegen/box/builderInference/kt65341.kt b/compiler/testData/codegen/box/builderInference/kt65341.kt new file mode 100644 index 00000000000..f0e652de1a1 --- /dev/null +++ b/compiler/testData/codegen/box/builderInference/kt65341.kt @@ -0,0 +1,24 @@ +// TARGET_BACKEND: JVM +// ISSUE: KT-65341 +// JVM_ABI_K1_K2_DIFF: KT-65386 + +val nodeTransformer = + single { + fun getConstructorParameterValue(kParameter: String) { + if (true) { + throw java.lang.IllegalStateException("${kParameter!!}") + } + } + } + +fun single( + singleConstructor: (NodeTransformer1) -> Output? +) { +} + +class NodeTransformer1 + +fun box(): String { + // Just making sure that for the original case the whole compiler pipeline is successfully completed + return "OK" +} diff --git a/compiler/testData/codegen/box/builderInference/posptonedPCLACallInsideStringInterpolation.kt b/compiler/testData/codegen/box/builderInference/posptonedPCLACallInsideStringInterpolation.kt new file mode 100644 index 00000000000..582a98b2217 --- /dev/null +++ b/compiler/testData/codegen/box/builderInference/posptonedPCLACallInsideStringInterpolation.kt @@ -0,0 +1,44 @@ +// ISSUE: KT-65341 +class Controller { + fun yield(k: K) {} +} + +fun generate(lambda: Controller.() -> Unit) {} + +fun bar(x: String) {} + +var v: String = "OK" + +fun foo0(x: String?) { + generate { + bar("$v abc${x!!}") + + yield("") + } +} + +fun foo1(x: String?) { + generate { + bar("$v abc${when { x != null -> x else -> null}}") + + yield("") + } +} + +fun id(e: E): E = e + +fun foo2(x: String?) { + generate { + bar("$v abc${id(this)}") + + yield("") + } +} + +fun box(): String { + foo0(null) + foo1(null) + foo2(null) + + return "OK" +} diff --git a/compiler/testData/ir/irText/expressions/posptonedPCLACallInsideStringInterpolation.fir.ir.txt b/compiler/testData/ir/irText/expressions/posptonedPCLACallInsideStringInterpolation.fir.ir.txt deleted file mode 100644 index c58c53663b9..00000000000 --- a/compiler/testData/ir/irText/expressions/posptonedPCLACallInsideStringInterpolation.fir.ir.txt +++ /dev/null @@ -1,54 +0,0 @@ -FILE fqName: fileName:/posptonedPCLACallInsideStringInterpolation.kt - CLASS CLASS name:Controller modality:FINAL visibility:public superTypes:[kotlin.Any] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Controller.Controller> - TYPE_PARAMETER name:K index:0 variance: superTypes:[kotlin.Any?] reified:false - CONSTRUCTOR visibility:public <> () returnType:.Controller.Controller> [primary] - BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL 'public constructor () declared in kotlin.Any' - INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Controller modality:FINAL visibility:public superTypes:[kotlin.Any]' - FUN name:yield visibility:public modality:FINAL <> ($this:.Controller.Controller>, k:K of .Controller) returnType:kotlin.Unit - $this: VALUE_PARAMETER name: type:.Controller.Controller> - VALUE_PARAMETER name:k index:0 type:K of .Controller - BLOCK_BODY - FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] - overridden: - public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any - $this: VALUE_PARAMETER name: type:kotlin.Any - VALUE_PARAMETER name:other index:0 type:kotlin.Any? - FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override] - overridden: - public open fun hashCode (): kotlin.Int declared in kotlin.Any - $this: VALUE_PARAMETER name: type:kotlin.Any - FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override] - overridden: - public open fun toString (): kotlin.String declared in kotlin.Any - $this: VALUE_PARAMETER name: type:kotlin.Any - FUN name:generate visibility:public modality:FINAL (lambda:@[ExtensionFunctionType] kotlin.Function1<.Controller.generate>, kotlin.Unit>) returnType:kotlin.Unit - TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?] reified:false - VALUE_PARAMETER name:lambda index:0 type:@[ExtensionFunctionType] kotlin.Function1<.Controller.generate>, kotlin.Unit> - BLOCK_BODY - FUN name:id visibility:public modality:FINAL (e:E of .id) returnType:E of .id - TYPE_PARAMETER name:E index:0 variance: superTypes:[kotlin.Any?] reified:false - VALUE_PARAMETER name:e index:0 type:E of .id - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun id (e: E of .id): E of .id declared in ' - GET_VAR 'e: E of .id declared in .id' type=E of .id origin=null - FUN name:bar visibility:public modality:FINAL <> (s:kotlin.String) returnType:kotlin.Unit - VALUE_PARAMETER name:s index:0 type:kotlin.String - BLOCK_BODY - FUN name:foo visibility:public modality:FINAL <> () returnType:kotlin.Unit - BLOCK_BODY - CALL 'public final fun generate (lambda: @[ExtensionFunctionType] kotlin.Function1<.Controller.generate>, kotlin.Unit>): kotlin.Unit declared in ' type=kotlin.Unit origin=null - : kotlin.String - lambda: FUN_EXPR type=@[ExtensionFunctionType] kotlin.Function1<.Controller, kotlin.Unit> origin=LAMBDA - FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> ($receiver:.Controller) returnType:kotlin.Unit - $receiver: VALUE_PARAMETER name:$this$generate type:.Controller - BLOCK_BODY - CALL 'public final fun bar (s: kotlin.String): kotlin.Unit declared in ' type=kotlin.Unit origin=null - s: STRING_CONCATENATION type=kotlin.String - CALL 'public final fun id (e: E of .id): E of .id declared in ' type=E of .id origin=null - : IrErrorType(null) - e: GET_VAR '$this$generate: .Controller declared in .foo.' type=.Controller origin=null - CALL 'public final fun yield (k: K of .Controller): kotlin.Unit declared in .Controller' type=kotlin.Unit origin=null - $this: GET_VAR '$this$generate: .Controller declared in .foo.' type=.Controller origin=null - k: CONST String type=kotlin.String value="" diff --git a/compiler/testData/ir/irText/expressions/posptonedPCLACallInsideStringInterpolation.fir.kt.txt b/compiler/testData/ir/irText/expressions/posptonedPCLACallInsideStringInterpolation.fir.kt.txt deleted file mode 100644 index 32ae62fc36d..00000000000 --- a/compiler/testData/ir/irText/expressions/posptonedPCLACallInsideStringInterpolation.fir.kt.txt +++ /dev/null @@ -1,29 +0,0 @@ -class Controller { - constructor() /* primary */ { - super/*Any*/() - /* () */ - - } - - fun yield(k: K) { - } - -} - -fun generate(lambda: @ExtensionFunctionType Function1, Unit>) { -} - -fun id(e: E): E { - return e -} - -fun bar(s: String) { -} - -fun foo() { - generate(lambda = local fun Controller.() { - bar(s = id(e = $this$generate)) - $this$generate.yield(k = "") - } -) -} diff --git a/compiler/testData/ir/irText/expressions/posptonedPCLACallInsideStringInterpolation.kt b/compiler/testData/ir/irText/expressions/posptonedPCLACallInsideStringInterpolation.kt index e1fca5b27cd..8a3df42b282 100644 --- a/compiler/testData/ir/irText/expressions/posptonedPCLACallInsideStringInterpolation.kt +++ b/compiler/testData/ir/irText/expressions/posptonedPCLACallInsideStringInterpolation.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // ISSUE: KT-65341 class Controller { fun yield(k: K) {} diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/JvmAbiConsistencyTestBoxGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/JvmAbiConsistencyTestBoxGenerated.java index 9fb5c93d2f6..03faaab80e0 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/JvmAbiConsistencyTestBoxGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/JvmAbiConsistencyTestBoxGenerated.java @@ -2755,6 +2755,12 @@ public class JvmAbiConsistencyTestBoxGenerated extends AbstractJvmAbiConsistency KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/builderInference"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test + @TestMetadata("kt65341.kt") + public void testKt65341() throws Exception { + runTest("compiler/testData/codegen/box/builderInference/kt65341.kt"); + } + @Test @TestMetadata("lambdaParameterHasTVType.kt") public void testLambdaParameterHasTVType() throws Exception { @@ -2785,6 +2791,12 @@ public class JvmAbiConsistencyTestBoxGenerated extends AbstractJvmAbiConsistency runTest("compiler/testData/codegen/box/builderInference/pclaRootIsTrySyntheticCall.kt"); } + @Test + @TestMetadata("posptonedPCLACallInsideStringInterpolation.kt") + public void testPosptonedPCLACallInsideStringInterpolation() throws Exception { + runTest("compiler/testData/codegen/box/builderInference/posptonedPCLACallInsideStringInterpolation.kt"); + } + @Test @TestMetadata("receiverUsesOuterTVButReturnTypeIsProper.kt") public void testReceiverUsesOuterTVButReturnTypeIsProper() throws Exception { 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 3c397875f93..1511a5240b2 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 @@ -2575,6 +2575,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/builderInference"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test + @TestMetadata("kt65341.kt") + public void testKt65341() throws Exception { + runTest("compiler/testData/codegen/box/builderInference/kt65341.kt"); + } + @Test @TestMetadata("lambdaParameterHasTVType.kt") public void testLambdaParameterHasTVType() throws Exception { @@ -2605,6 +2611,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { runTest("compiler/testData/codegen/box/builderInference/pclaRootIsTrySyntheticCall.kt"); } + @Test + @TestMetadata("posptonedPCLACallInsideStringInterpolation.kt") + public void testPosptonedPCLACallInsideStringInterpolation() throws Exception { + runTest("compiler/testData/codegen/box/builderInference/posptonedPCLACallInsideStringInterpolation.kt"); + } + @Test @TestMetadata("receiverUsesOuterTVButReturnTypeIsProper.kt") public void testReceiverUsesOuterTVButReturnTypeIsProper() 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 5255c3b22c1..f4af9ec2e12 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 @@ -2755,6 +2755,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/builderInference"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test + @TestMetadata("kt65341.kt") + public void testKt65341() throws Exception { + runTest("compiler/testData/codegen/box/builderInference/kt65341.kt"); + } + @Test @TestMetadata("lambdaParameterHasTVType.kt") public void testLambdaParameterHasTVType() throws Exception { @@ -2785,6 +2791,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes runTest("compiler/testData/codegen/box/builderInference/pclaRootIsTrySyntheticCall.kt"); } + @Test + @TestMetadata("posptonedPCLACallInsideStringInterpolation.kt") + public void testPosptonedPCLACallInsideStringInterpolation() throws Exception { + runTest("compiler/testData/codegen/box/builderInference/posptonedPCLACallInsideStringInterpolation.kt"); + } + @Test @TestMetadata("receiverUsesOuterTVButReturnTypeIsProper.kt") public void testReceiverUsesOuterTVButReturnTypeIsProper() throws Exception { diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenWithIrInlinerTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenWithIrInlinerTestGenerated.java index 9f9297e16e5..6451df2c8d1 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenWithIrInlinerTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenWithIrInlinerTestGenerated.java @@ -2755,6 +2755,12 @@ public class IrBlackBoxCodegenWithIrInlinerTestGenerated extends AbstractIrBlack KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/builderInference"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test + @TestMetadata("kt65341.kt") + public void testKt65341() throws Exception { + runTest("compiler/testData/codegen/box/builderInference/kt65341.kt"); + } + @Test @TestMetadata("lambdaParameterHasTVType.kt") public void testLambdaParameterHasTVType() throws Exception { @@ -2785,6 +2791,12 @@ public class IrBlackBoxCodegenWithIrInlinerTestGenerated extends AbstractIrBlack runTest("compiler/testData/codegen/box/builderInference/pclaRootIsTrySyntheticCall.kt"); } + @Test + @TestMetadata("posptonedPCLACallInsideStringInterpolation.kt") + public void testPosptonedPCLACallInsideStringInterpolation() throws Exception { + runTest("compiler/testData/codegen/box/builderInference/posptonedPCLACallInsideStringInterpolation.kt"); + } + @Test @TestMetadata("receiverUsesOuterTVButReturnTypeIsProper.kt") public void testReceiverUsesOuterTVButReturnTypeIsProper() 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 8af2c2c730c..c0e2c4a6379 100644 --- a/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java +++ b/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java @@ -2403,6 +2403,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/builderInference"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @TestMetadata("kt65341.kt") + public void testKt65341() throws Exception { + runTest("compiler/testData/codegen/box/builderInference/kt65341.kt"); + } + @TestMetadata("lambdaParameterHasTVType.kt") public void testLambdaParameterHasTVType() throws Exception { runTest("compiler/testData/codegen/box/builderInference/lambdaParameterHasTVType.kt"); @@ -2428,6 +2433,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes runTest("compiler/testData/codegen/box/builderInference/pclaRootIsTrySyntheticCall.kt"); } + @TestMetadata("posptonedPCLACallInsideStringInterpolation.kt") + public void testPosptonedPCLACallInsideStringInterpolation() throws Exception { + runTest("compiler/testData/codegen/box/builderInference/posptonedPCLACallInsideStringInterpolation.kt"); + } + @TestMetadata("receiverUsesOuterTVButReturnTypeIsProper.kt") public void testReceiverUsesOuterTVButReturnTypeIsProper() throws Exception { runTest("compiler/testData/codegen/box/builderInference/receiverUsesOuterTVButReturnTypeIsProper.kt"); diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirJsCodegenBoxTestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirJsCodegenBoxTestGenerated.java index f747ee79218..a821f3132e0 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirJsCodegenBoxTestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirJsCodegenBoxTestGenerated.java @@ -1891,6 +1891,12 @@ public class FirJsCodegenBoxTestGenerated extends AbstractFirJsCodegenBoxTest { runTest("compiler/testData/codegen/box/builderInference/pclaRootIsTrySyntheticCall.kt"); } + @Test + @TestMetadata("posptonedPCLACallInsideStringInterpolation.kt") + public void testPosptonedPCLACallInsideStringInterpolation() throws Exception { + runTest("compiler/testData/codegen/box/builderInference/posptonedPCLACallInsideStringInterpolation.kt"); + } + @Test @TestMetadata("receiverUsesOuterTVButReturnTypeIsProper.kt") public void testReceiverUsesOuterTVButReturnTypeIsProper() throws Exception { diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirJsES6CodegenBoxTestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirJsES6CodegenBoxTestGenerated.java index f31d6dce062..346012d75b2 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirJsES6CodegenBoxTestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirJsES6CodegenBoxTestGenerated.java @@ -1891,6 +1891,12 @@ public class FirJsES6CodegenBoxTestGenerated extends AbstractFirJsES6CodegenBoxT runTest("compiler/testData/codegen/box/builderInference/pclaRootIsTrySyntheticCall.kt"); } + @Test + @TestMetadata("posptonedPCLACallInsideStringInterpolation.kt") + public void testPosptonedPCLACallInsideStringInterpolation() throws Exception { + runTest("compiler/testData/codegen/box/builderInference/posptonedPCLACallInsideStringInterpolation.kt"); + } + @Test @TestMetadata("receiverUsesOuterTVButReturnTypeIsProper.kt") public void testReceiverUsesOuterTVButReturnTypeIsProper() throws Exception { diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrJsCodegenBoxTestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrJsCodegenBoxTestGenerated.java index 696228532e2..98593d44679 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrJsCodegenBoxTestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrJsCodegenBoxTestGenerated.java @@ -1891,6 +1891,12 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest { runTest("compiler/testData/codegen/box/builderInference/pclaRootIsTrySyntheticCall.kt"); } + @Test + @TestMetadata("posptonedPCLACallInsideStringInterpolation.kt") + public void testPosptonedPCLACallInsideStringInterpolation() throws Exception { + runTest("compiler/testData/codegen/box/builderInference/posptonedPCLACallInsideStringInterpolation.kt"); + } + @Test @TestMetadata("receiverUsesOuterTVButReturnTypeIsProper.kt") public void testReceiverUsesOuterTVButReturnTypeIsProper() throws Exception { diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrJsES6CodegenBoxTestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrJsES6CodegenBoxTestGenerated.java index d4dcaf273fd..8d1c8157a16 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrJsES6CodegenBoxTestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrJsES6CodegenBoxTestGenerated.java @@ -1891,6 +1891,12 @@ public class IrJsES6CodegenBoxTestGenerated extends AbstractIrJsES6CodegenBoxTes runTest("compiler/testData/codegen/box/builderInference/pclaRootIsTrySyntheticCall.kt"); } + @Test + @TestMetadata("posptonedPCLACallInsideStringInterpolation.kt") + public void testPosptonedPCLACallInsideStringInterpolation() throws Exception { + runTest("compiler/testData/codegen/box/builderInference/posptonedPCLACallInsideStringInterpolation.kt"); + } + @Test @TestMetadata("receiverUsesOuterTVButReturnTypeIsProper.kt") public void testReceiverUsesOuterTVButReturnTypeIsProper() throws Exception { diff --git a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/FirNativeCodegenBoxTestGenerated.java b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/FirNativeCodegenBoxTestGenerated.java index bb2d078861c..21e0d215264 100644 --- a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/FirNativeCodegenBoxTestGenerated.java +++ b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/FirNativeCodegenBoxTestGenerated.java @@ -1950,6 +1950,12 @@ public class FirNativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTe runTest("compiler/testData/codegen/box/builderInference/pclaRootIsTrySyntheticCall.kt"); } + @Test + @TestMetadata("posptonedPCLACallInsideStringInterpolation.kt") + public void testPosptonedPCLACallInsideStringInterpolation() throws Exception { + runTest("compiler/testData/codegen/box/builderInference/posptonedPCLACallInsideStringInterpolation.kt"); + } + @Test @TestMetadata("receiverUsesOuterTVButReturnTypeIsProper.kt") public void testReceiverUsesOuterTVButReturnTypeIsProper() throws Exception { diff --git a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/FirNativeCodegenBoxTestNoPLGenerated.java b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/FirNativeCodegenBoxTestNoPLGenerated.java index 6447bab5bb3..0c90292dc4b 100644 --- a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/FirNativeCodegenBoxTestNoPLGenerated.java +++ b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/FirNativeCodegenBoxTestNoPLGenerated.java @@ -1996,6 +1996,12 @@ public class FirNativeCodegenBoxTestNoPLGenerated extends AbstractNativeCodegenB runTest("compiler/testData/codegen/box/builderInference/pclaRootIsTrySyntheticCall.kt"); } + @Test + @TestMetadata("posptonedPCLACallInsideStringInterpolation.kt") + public void testPosptonedPCLACallInsideStringInterpolation() throws Exception { + runTest("compiler/testData/codegen/box/builderInference/posptonedPCLACallInsideStringInterpolation.kt"); + } + @Test @TestMetadata("receiverUsesOuterTVButReturnTypeIsProper.kt") public void testReceiverUsesOuterTVButReturnTypeIsProper() throws Exception { diff --git a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/NativeCodegenBoxTestGenerated.java b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/NativeCodegenBoxTestGenerated.java index 0de55996da8..cb22f46238b 100644 --- a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/NativeCodegenBoxTestGenerated.java +++ b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/NativeCodegenBoxTestGenerated.java @@ -1904,6 +1904,12 @@ public class NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTest runTest("compiler/testData/codegen/box/builderInference/pclaRootIsTrySyntheticCall.kt"); } + @Test + @TestMetadata("posptonedPCLACallInsideStringInterpolation.kt") + public void testPosptonedPCLACallInsideStringInterpolation() throws Exception { + runTest("compiler/testData/codegen/box/builderInference/posptonedPCLACallInsideStringInterpolation.kt"); + } + @Test @TestMetadata("receiverUsesOuterTVButReturnTypeIsProper.kt") public void testReceiverUsesOuterTVButReturnTypeIsProper() throws Exception { diff --git a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/NativeCodegenBoxTestNoPLGenerated.java b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/NativeCodegenBoxTestNoPLGenerated.java index e0c7e8cd586..3bc3645ead3 100644 --- a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/NativeCodegenBoxTestNoPLGenerated.java +++ b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/NativeCodegenBoxTestNoPLGenerated.java @@ -1951,6 +1951,12 @@ public class NativeCodegenBoxTestNoPLGenerated extends AbstractNativeCodegenBoxT runTest("compiler/testData/codegen/box/builderInference/pclaRootIsTrySyntheticCall.kt"); } + @Test + @TestMetadata("posptonedPCLACallInsideStringInterpolation.kt") + public void testPosptonedPCLACallInsideStringInterpolation() throws Exception { + runTest("compiler/testData/codegen/box/builderInference/posptonedPCLACallInsideStringInterpolation.kt"); + } + @Test @TestMetadata("receiverUsesOuterTVButReturnTypeIsProper.kt") public void testReceiverUsesOuterTVButReturnTypeIsProper() throws Exception { diff --git a/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/FirWasmJsCodegenBoxTestGenerated.java b/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/FirWasmJsCodegenBoxTestGenerated.java index e21cbdb4b01..e6fc66ba8a1 100644 --- a/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/FirWasmJsCodegenBoxTestGenerated.java +++ b/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/FirWasmJsCodegenBoxTestGenerated.java @@ -1879,6 +1879,12 @@ public class FirWasmJsCodegenBoxTestGenerated extends AbstractFirWasmJsCodegenBo runTest("compiler/testData/codegen/box/builderInference/pclaRootIsTrySyntheticCall.kt"); } + @Test + @TestMetadata("posptonedPCLACallInsideStringInterpolation.kt") + public void testPosptonedPCLACallInsideStringInterpolation() throws Exception { + runTest("compiler/testData/codegen/box/builderInference/posptonedPCLACallInsideStringInterpolation.kt"); + } + @Test @TestMetadata("receiverUsesOuterTVButReturnTypeIsProper.kt") public void testReceiverUsesOuterTVButReturnTypeIsProper() throws Exception { diff --git a/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/K1WasmCodegenBoxTestGenerated.java b/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/K1WasmCodegenBoxTestGenerated.java index e9f7c1c685d..5da7a193c31 100644 --- a/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/K1WasmCodegenBoxTestGenerated.java +++ b/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/K1WasmCodegenBoxTestGenerated.java @@ -1879,6 +1879,12 @@ public class K1WasmCodegenBoxTestGenerated extends AbstractK1WasmCodegenBoxTest runTest("compiler/testData/codegen/box/builderInference/pclaRootIsTrySyntheticCall.kt"); } + @Test + @TestMetadata("posptonedPCLACallInsideStringInterpolation.kt") + public void testPosptonedPCLACallInsideStringInterpolation() throws Exception { + runTest("compiler/testData/codegen/box/builderInference/posptonedPCLACallInsideStringInterpolation.kt"); + } + @Test @TestMetadata("receiverUsesOuterTVButReturnTypeIsProper.kt") public void testReceiverUsesOuterTVButReturnTypeIsProper() throws Exception {