diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/problems/invokePriority.fir.txt b/compiler/fir/analysis-tests/testData/resolveWithStdlib/problems/invokePriority.fir.txt index 451d41ad327..136ca5ad6bf 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/problems/invokePriority.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/problems/invokePriority.fir.txt @@ -14,7 +14,7 @@ FILE: invokePriority.kt String(1).R|/foo|() R|kotlin/with|(String(2), = with@fun R|kotlin/String|.(): R|kotlin/Unit| { - this@R|special/anonymous|.R|/foo|() + R|/foo|.R|SubstitutionOverride|(this@R|special/anonymous|) } ) } diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/problems/invokePriority.kt b/compiler/fir/analysis-tests/testData/resolveWithStdlib/problems/invokePriority.kt index a06261ea243..c499fc0faff 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/problems/invokePriority.kt +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/problems/invokePriority.kt @@ -4,7 +4,7 @@ class A { fun String.foo(): Unit {} // (2) "1".foo() // resolves to (2) with("2") { - foo() // BUG: resolves to (1) in old FE, but to (2) in FIR + foo() // resolves to (1) } } } 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 3ea8ebc554e..8ba15de8717 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 @@ -18557,6 +18557,12 @@ public class FirLightTreeBlackBoxCodegenTestGenerated extends AbstractFirLightTr runTest("compiler/testData/codegen/box/fir/linkViaSignatures.kt"); } + @Test + @TestMetadata("localInvokeExtension.kt") + public void testLocalInvokeExtension() throws Exception { + runTest("compiler/testData/codegen/box/fir/localInvokeExtension.kt"); + } + @Test @TestMetadata("localOverrideWithDefaultInLocalOverridden.kt") public void testLocalOverrideWithDefaultInLocalOverridden() 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 e0b558f65d5..2497df92e99 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 @@ -18557,6 +18557,12 @@ public class FirPsiBlackBoxCodegenTestGenerated extends AbstractFirPsiBlackBoxCo runTest("compiler/testData/codegen/box/fir/linkViaSignatures.kt"); } + @Test + @TestMetadata("localInvokeExtension.kt") + public void testLocalInvokeExtension() throws Exception { + runTest("compiler/testData/codegen/box/fir/localInvokeExtension.kt"); + } + @Test @TestMetadata("localOverrideWithDefaultInLocalOverridden.kt") public void testLocalOverrideWithDefaultInLocalOverridden() throws Exception { diff --git a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/calls/tower/FirInvokeResolveTowerExtension.kt b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/calls/tower/FirInvokeResolveTowerExtension.kt index f589e6207f6..4a70cd84f90 100644 --- a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/calls/tower/FirInvokeResolveTowerExtension.kt +++ b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/calls/tower/FirInvokeResolveTowerExtension.kt @@ -431,6 +431,7 @@ private class InvokeFunctionResolveTask( val towerGroup = TowerGroup .Implicit(depth) + // see invokeExtensionVsOther2.kt test .InvokeExtensionWithImplicitReceiver .withGivenInvokeReceiverGroup(InvokeResolvePriority.INVOKE_EXTENSION) diff --git a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/calls/tower/TowerGroup.kt b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/calls/tower/TowerGroup.kt index 8c488c6094a..ed17da7c1c9 100644 --- a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/calls/tower/TowerGroup.kt +++ b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/calls/tower/TowerGroup.kt @@ -37,13 +37,17 @@ sealed class TowerGroupKind(val index: Byte) : Comparable { data object Member : TowerGroupKind(4) - class Local(depth: Int) : WithDepth(5, depth) + // If a variable of extension function type belong to some scope X, and there's an implicit receiver Y, then its invoke candidate + // should be less prioritized than the member scope of Y (see diagnostics/tests/resolve/priority/invokeExtensionVsOther2.kt), + // but more prioritized than extensions in X with bound receiver of Y (see analysis-tests/testData/resolveWithStdlib/problems/invokePriority.kt). + // That's why it's been places between Member and Local/ImplicitOrNonLocal. + data object InvokeExtensionWithImplicitReceiver : TowerGroupKind(5) - class ImplicitOrNonLocal(depth: Int, val kindForDebugSake: String) : WithDepth(6, depth) + class Local(depth: Int) : WithDepth(6, depth) - class ContextReceiverGroup(depth: Int) : WithDepth(7, depth) + class ImplicitOrNonLocal(depth: Int, val kindForDebugSake: String) : WithDepth(7, depth) - data object InvokeExtensionWithImplicitReceiver : TowerGroupKind(8) + class ContextReceiverGroup(depth: Int) : WithDepth(8, depth) data object QualifierValue : TowerGroupKind(9) @@ -198,6 +202,8 @@ private constructor( val Member get() = kindOf(TowerGroupKind.Member) + val InvokeExtensionWithImplicitReceiver get() = kindOf(TowerGroupKind.InvokeExtensionWithImplicitReceiver) + fun Local(depth: Int) = kindOf(TowerGroupKind.Local(depth)) fun Implicit(depth: Int) = kindOf(TowerGroupKind.Implicit(depth)) @@ -205,8 +211,6 @@ private constructor( fun ContextReceiverGroup(depth: Int) = kindOf(TowerGroupKind.ContextReceiverGroup(depth)) - val InvokeExtensionWithImplicitReceiver get() = kindOf(TowerGroupKind.InvokeExtensionWithImplicitReceiver) - fun TopPrioritized(depth: Int) = kindOf(TowerGroupKind.TopPrioritized(depth)) fun InvokeReceiver( diff --git a/compiler/testData/codegen/box/defaultArguments/kt36853_fibonacci.kt b/compiler/testData/codegen/box/defaultArguments/kt36853_fibonacci.kt index 7723aa948e7..680e6e8024d 100644 --- a/compiler/testData/codegen/box/defaultArguments/kt36853_fibonacci.kt +++ b/compiler/testData/codegen/box/defaultArguments/kt36853_fibonacci.kt @@ -1,10 +1,5 @@ // WITH_STDLIB -// IGNORE_BACKEND_K2: JVM_IR, JS_IR, NATIVE, WASM -// FIR status: -// java.lang.StackOverflowError -// at Nat$Companion$invoke$1.next(kt36853_fibonacci.kt:40) ... - fun box(): String { Nat( nil = 0, diff --git a/compiler/testData/codegen/box/fir/localInvokeExtension.kt b/compiler/testData/codegen/box/fir/localInvokeExtension.kt new file mode 100644 index 00000000000..dbdfb049ba2 --- /dev/null +++ b/compiler/testData/codegen/box/fir/localInvokeExtension.kt @@ -0,0 +1,55 @@ +// ISSUE: KT-59541 +interface WriteContext { + val x: String +} + +interface ReadContext { + val y: String +} + +interface Codec { + fun WriteContext.encode(value: T) + fun ReadContext.decode(): T? +} + +fun codec( + encode: WriteContext.(T) -> Unit, + decode: ReadContext.() -> T? +): Codec = object : Codec { + // Mostly, we check in this test that both `encode(value)` and `decode()` are resolved + // to the corresponding parameters of `codec` function (see KT-59541) + // Because before the fix for KT-37375, they both were resolved to the members of the anonymous objects + // leading to recursion and stack overflow. + override fun WriteContext.encode(value: T) = encode(value) + override fun ReadContext.decode(): T? = decode() +} + +fun box(): String { + var result = "" + + val t = codec( + { + result += x + it + }, + { + y + } + ) + + + + with(t) { + object : WriteContext { + override val x: String + get() = "O" + }.encode("K") + + result += object : ReadContext { + override val y: String + get() = "123" + }.decode() + } + + if (result != "OK123") return "fail: $result" + return "OK" +} diff --git a/compiler/testData/diagnostics/tests/resolve/invoke/implicitAndInvokeExtensionPriority.fir.kt b/compiler/testData/diagnostics/tests/resolve/invoke/implicitAndInvokeExtensionPriority.fir.kt deleted file mode 100644 index 7110ae57a24..00000000000 --- a/compiler/testData/diagnostics/tests/resolve/invoke/implicitAndInvokeExtensionPriority.fir.kt +++ /dev/null @@ -1,16 +0,0 @@ -// ISSUE: KT-58943 - -class A { - fun bar() { - val foo: String.() -> Int = { 1 } // (1) - fun String.foo(): String = "" // (2) - with("2") { - // In K1, foo variable + invokeExtension on implicit receiver is more prioritized than `foo() + implicit receiver` - // So, for now, we're going to preserve that behavior in K2 - // For design, see KT-59528 - takeInt(foo()) - } - } -} - -fun takeInt(x: Int) {} \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/resolve/invoke/implicitAndInvokeExtensionPriority.kt b/compiler/testData/diagnostics/tests/resolve/invoke/implicitAndInvokeExtensionPriority.kt index 138c4c0dc23..2d8764aefe5 100644 --- a/compiler/testData/diagnostics/tests/resolve/invoke/implicitAndInvokeExtensionPriority.kt +++ b/compiler/testData/diagnostics/tests/resolve/invoke/implicitAndInvokeExtensionPriority.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // ISSUE: KT-58943 class A { 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 564b55ad641..ef640e58bfb 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 @@ -17699,6 +17699,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { runTest("compiler/testData/codegen/box/fir/KotlinDocumentationProvider.kt"); } + @Test + @TestMetadata("localInvokeExtension.kt") + public void testLocalInvokeExtension() throws Exception { + runTest("compiler/testData/codegen/box/fir/localInvokeExtension.kt"); + } + @Test @TestMetadata("localOverrideWithDefaultInLocalOverridden.kt") public void testLocalOverrideWithDefaultInLocalOverridden() 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 4f0b0571680..def6fa5c0c6 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 @@ -18557,6 +18557,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes runTest("compiler/testData/codegen/box/fir/linkViaSignatures.kt"); } + @Test + @TestMetadata("localInvokeExtension.kt") + public void testLocalInvokeExtension() throws Exception { + runTest("compiler/testData/codegen/box/fir/localInvokeExtension.kt"); + } + @Test @TestMetadata("localOverrideWithDefaultInLocalOverridden.kt") public void testLocalOverrideWithDefaultInLocalOverridden() 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 d222f6a220b..154096354fe 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 @@ -18557,6 +18557,12 @@ public class IrBlackBoxCodegenWithIrInlinerTestGenerated extends AbstractIrBlack runTest("compiler/testData/codegen/box/fir/linkViaSignatures.kt"); } + @Test + @TestMetadata("localInvokeExtension.kt") + public void testLocalInvokeExtension() throws Exception { + runTest("compiler/testData/codegen/box/fir/localInvokeExtension.kt"); + } + @Test @TestMetadata("localOverrideWithDefaultInLocalOverridden.kt") public void testLocalOverrideWithDefaultInLocalOverridden() 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 e8295817e77..3f4885fef62 100644 --- a/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java +++ b/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java @@ -15415,6 +15415,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes runTest("compiler/testData/codegen/box/fir/linkViaSignatures.kt"); } + @TestMetadata("localInvokeExtension.kt") + public void testLocalInvokeExtension() throws Exception { + runTest("compiler/testData/codegen/box/fir/localInvokeExtension.kt"); + } + @TestMetadata("localOverrideWithDefaultInLocalOverridden.kt") public void testLocalOverrideWithDefaultInLocalOverridden() throws Exception { runTest("compiler/testData/codegen/box/fir/localOverrideWithDefaultInLocalOverridden.kt"); diff --git a/compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/call-with-an-explicit-receiver/p-6/pos/2.2.fir.kt b/compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/call-with-an-explicit-receiver/p-6/pos/2.2.fir.kt index 116b37ac629..be9fb4891ce 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/call-with-an-explicit-receiver/p-6/pos/2.2.fir.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/call-with-an-explicit-receiver/p-6/pos/2.2.fir.kt @@ -26,11 +26,11 @@ class Case1 { this.foo() //resolves to (2) } "".run { - foo() //resolves to (1) !!! + foo() //resolves to (1) !!! this.foo() //resolves to (2) } "".apply { - foo() //resolves to (1) !!! + foo() //resolves to (1) !!! this.foo() //resolves to (2) } "".also { 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 9d0d14fc792..26318b9fb31 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 @@ -13667,6 +13667,12 @@ public class FirJsCodegenBoxTestGenerated extends AbstractFirJsCodegenBoxTest { runTest("compiler/testData/codegen/box/fir/falsePositiveBoundSmartcast.kt"); } + @Test + @TestMetadata("localInvokeExtension.kt") + public void testLocalInvokeExtension() throws Exception { + runTest("compiler/testData/codegen/box/fir/localInvokeExtension.kt"); + } + @Test @TestMetadata("localOverrideWithDefaultInLocalOverridden.kt") public void testLocalOverrideWithDefaultInLocalOverridden() 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 70be6e21f92..e2a20153ddc 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 @@ -13667,6 +13667,12 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest { runTest("compiler/testData/codegen/box/fir/falsePositiveBoundSmartcast.kt"); } + @Test + @TestMetadata("localInvokeExtension.kt") + public void testLocalInvokeExtension() throws Exception { + runTest("compiler/testData/codegen/box/fir/localInvokeExtension.kt"); + } + @Test @TestMetadata("localOverrideWithDefaultInLocalOverridden.kt") public void testLocalOverrideWithDefaultInLocalOverridden() 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 a228793438c..c5dd27d4415 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 @@ -13667,6 +13667,12 @@ public class IrJsES6CodegenBoxTestGenerated extends AbstractIrJsES6CodegenBoxTes runTest("compiler/testData/codegen/box/fir/falsePositiveBoundSmartcast.kt"); } + @Test + @TestMetadata("localInvokeExtension.kt") + public void testLocalInvokeExtension() throws Exception { + runTest("compiler/testData/codegen/box/fir/localInvokeExtension.kt"); + } + @Test @TestMetadata("localOverrideWithDefaultInLocalOverridden.kt") public void testLocalOverrideWithDefaultInLocalOverridden() throws Exception { diff --git a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/FirNativeCodegenBoxTestGenerated.java b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/FirNativeCodegenBoxTestGenerated.java index b3533a3a561..e3c18894da2 100644 --- a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/FirNativeCodegenBoxTestGenerated.java +++ b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/FirNativeCodegenBoxTestGenerated.java @@ -14773,6 +14773,12 @@ public class FirNativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTe runTest("compiler/testData/codegen/box/fir/falsePositiveBoundSmartcast.kt"); } + @Test + @TestMetadata("localInvokeExtension.kt") + public void testLocalInvokeExtension() throws Exception { + runTest("compiler/testData/codegen/box/fir/localInvokeExtension.kt"); + } + @Test @TestMetadata("localOverrideWithDefaultInLocalOverridden.kt") public void testLocalOverrideWithDefaultInLocalOverridden() throws Exception { diff --git a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/FirNativeCodegenBoxTestNoPLGenerated.java b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/FirNativeCodegenBoxTestNoPLGenerated.java index 5128defa531..0774bbcd4b7 100644 --- a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/FirNativeCodegenBoxTestNoPLGenerated.java +++ b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/FirNativeCodegenBoxTestNoPLGenerated.java @@ -15121,6 +15121,12 @@ public class FirNativeCodegenBoxTestNoPLGenerated extends AbstractNativeCodegenB runTest("compiler/testData/codegen/box/fir/falsePositiveBoundSmartcast.kt"); } + @Test + @TestMetadata("localInvokeExtension.kt") + public void testLocalInvokeExtension() throws Exception { + runTest("compiler/testData/codegen/box/fir/localInvokeExtension.kt"); + } + @Test @TestMetadata("localOverrideWithDefaultInLocalOverridden.kt") public void testLocalOverrideWithDefaultInLocalOverridden() throws Exception { diff --git a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/NativeCodegenBoxTestGenerated.java b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/NativeCodegenBoxTestGenerated.java index c26cf94fb62..e0c09f0e455 100644 --- a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/NativeCodegenBoxTestGenerated.java +++ b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/NativeCodegenBoxTestGenerated.java @@ -14600,6 +14600,12 @@ public class NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTest runTest("compiler/testData/codegen/box/fir/falsePositiveBoundSmartcast.kt"); } + @Test + @TestMetadata("localInvokeExtension.kt") + public void testLocalInvokeExtension() throws Exception { + runTest("compiler/testData/codegen/box/fir/localInvokeExtension.kt"); + } + @Test @TestMetadata("localOverrideWithDefaultInLocalOverridden.kt") public void testLocalOverrideWithDefaultInLocalOverridden() throws Exception { diff --git a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/NativeCodegenBoxTestNoPLGenerated.java b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/NativeCodegenBoxTestNoPLGenerated.java index 75e61689359..7cfea31dec8 100644 --- a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/NativeCodegenBoxTestNoPLGenerated.java +++ b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/NativeCodegenBoxTestNoPLGenerated.java @@ -14774,6 +14774,12 @@ public class NativeCodegenBoxTestNoPLGenerated extends AbstractNativeCodegenBoxT runTest("compiler/testData/codegen/box/fir/falsePositiveBoundSmartcast.kt"); } + @Test + @TestMetadata("localInvokeExtension.kt") + public void testLocalInvokeExtension() throws Exception { + runTest("compiler/testData/codegen/box/fir/localInvokeExtension.kt"); + } + @Test @TestMetadata("localOverrideWithDefaultInLocalOverridden.kt") public void testLocalOverrideWithDefaultInLocalOverridden() throws Exception { diff --git a/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/FirWasmCodegenBoxTestGenerated.java b/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/FirWasmCodegenBoxTestGenerated.java index 6a97debd666..73fac38ace8 100644 --- a/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/FirWasmCodegenBoxTestGenerated.java +++ b/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/FirWasmCodegenBoxTestGenerated.java @@ -13643,6 +13643,12 @@ public class FirWasmCodegenBoxTestGenerated extends AbstractFirWasmCodegenBoxTes runTest("compiler/testData/codegen/box/fir/falsePositiveBoundSmartcast.kt"); } + @Test + @TestMetadata("localInvokeExtension.kt") + public void testLocalInvokeExtension() throws Exception { + runTest("compiler/testData/codegen/box/fir/localInvokeExtension.kt"); + } + @Test @TestMetadata("localOverrideWithDefaultInLocalOverridden.kt") public void testLocalOverrideWithDefaultInLocalOverridden() 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 58f1bb96510..1406669d74f 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 @@ -13643,6 +13643,12 @@ public class K1WasmCodegenBoxTestGenerated extends AbstractK1WasmCodegenBoxTest runTest("compiler/testData/codegen/box/fir/falsePositiveBoundSmartcast.kt"); } + @Test + @TestMetadata("localInvokeExtension.kt") + public void testLocalInvokeExtension() throws Exception { + runTest("compiler/testData/codegen/box/fir/localInvokeExtension.kt"); + } + @Test @TestMetadata("localOverrideWithDefaultInLocalOverridden.kt") public void testLocalOverrideWithDefaultInLocalOverridden() throws Exception {