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 1cfb31a9eee..da87a932389 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 @@ -6638,6 +6638,12 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT runTest("compiler/testData/codegen/box/companion/delegatedPropertyOnCompanion.kt"); } + @Test + @TestMetadata("genericLambdaOnStringCompanion.kt") + public void testGenericLambdaOnStringCompanion() throws Exception { + runTest("compiler/testData/codegen/box/companion/genericLambdaOnStringCompanion.kt"); + } + @Test @TestMetadata("inlineFunctionCompanionPropertyAccess.kt") public void testInlineFunctionCompanionPropertyAccess() throws Exception { diff --git a/compiler/testData/codegen/box/companion/genericLambdaOnStringCompanion.kt b/compiler/testData/codegen/box/companion/genericLambdaOnStringCompanion.kt new file mode 100644 index 00000000000..656ce225d1e --- /dev/null +++ b/compiler/testData/codegen/box/companion/genericLambdaOnStringCompanion.kt @@ -0,0 +1,10 @@ +// WITH_RUNTIME + +fun T.f(E: (y: T) -> String): Boolean = E(this).isEmpty() + +fun fu1() = (String).f { v -> "" } + +fun box(): String { + if (!fu1()) return "Failed: Expect lambda to return empty string" + return "OK" +} \ No newline at end of file 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 3b8d6f562e3..34891818fc7 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 @@ -6566,6 +6566,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { runTest("compiler/testData/codegen/box/companion/delegatedPropertyOnCompanion.kt"); } + @Test + @TestMetadata("genericLambdaOnStringCompanion.kt") + public void testGenericLambdaOnStringCompanion() throws Exception { + runTest("compiler/testData/codegen/box/companion/genericLambdaOnStringCompanion.kt"); + } + @Test @TestMetadata("inlineFunctionCompanionPropertyAccess.kt") public void testInlineFunctionCompanionPropertyAccess() 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 054f08158ba..ea38cb681ac 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 @@ -6638,6 +6638,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes runTest("compiler/testData/codegen/box/companion/delegatedPropertyOnCompanion.kt"); } + @Test + @TestMetadata("genericLambdaOnStringCompanion.kt") + public void testGenericLambdaOnStringCompanion() throws Exception { + runTest("compiler/testData/codegen/box/companion/genericLambdaOnStringCompanion.kt"); + } + @Test @TestMetadata("inlineFunctionCompanionPropertyAccess.kt") public void testInlineFunctionCompanionPropertyAccess() 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 3ff47410d54..6b2f9c99316 100644 --- a/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java +++ b/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java @@ -5728,6 +5728,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes runTest("compiler/testData/codegen/box/companion/delegatedPropertyOnCompanion.kt"); } + @TestMetadata("genericLambdaOnStringCompanion.kt") + public void testGenericLambdaOnStringCompanion() throws Exception { + runTest("compiler/testData/codegen/box/companion/genericLambdaOnStringCompanion.kt"); + } + @TestMetadata("inlineFunctionCompanionPropertyAccess.kt") public void testInlineFunctionCompanionPropertyAccess() throws Exception { runTest("compiler/testData/codegen/box/companion/inlineFunctionCompanionPropertyAccess.kt"); diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/es6/semantics/IrJsCodegenBoxES6TestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/es6/semantics/IrJsCodegenBoxES6TestGenerated.java index 5a6284b7e51..53565c75278 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/es6/semantics/IrJsCodegenBoxES6TestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/es6/semantics/IrJsCodegenBoxES6TestGenerated.java @@ -4458,6 +4458,11 @@ public class IrJsCodegenBoxES6TestGenerated extends AbstractIrJsCodegenBoxES6Tes runTest("compiler/testData/codegen/box/companion/delegatedPropertyOnCompanion.kt"); } + @TestMetadata("genericLambdaOnStringCompanion.kt") + public void testGenericLambdaOnStringCompanion() throws Exception { + runTest("compiler/testData/codegen/box/companion/genericLambdaOnStringCompanion.kt"); + } + @TestMetadata("inlineFunctionCompanionPropertyAccess.kt") public void testInlineFunctionCompanionPropertyAccess() throws Exception { runTest("compiler/testData/codegen/box/companion/inlineFunctionCompanionPropertyAccess.kt"); diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/semantics/IrJsCodegenBoxTestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/semantics/IrJsCodegenBoxTestGenerated.java index 0e8ee2d48b3..679c6001328 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/semantics/IrJsCodegenBoxTestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/semantics/IrJsCodegenBoxTestGenerated.java @@ -4458,6 +4458,11 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest { runTest("compiler/testData/codegen/box/companion/delegatedPropertyOnCompanion.kt"); } + @TestMetadata("genericLambdaOnStringCompanion.kt") + public void testGenericLambdaOnStringCompanion() throws Exception { + runTest("compiler/testData/codegen/box/companion/genericLambdaOnStringCompanion.kt"); + } + @TestMetadata("inlineFunctionCompanionPropertyAccess.kt") public void testInlineFunctionCompanionPropertyAccess() throws Exception { runTest("compiler/testData/codegen/box/companion/inlineFunctionCompanionPropertyAccess.kt"); diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/semantics/JsCodegenBoxTestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/semantics/JsCodegenBoxTestGenerated.java index 8f39e24174f..9df46e7c55e 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/semantics/JsCodegenBoxTestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/semantics/JsCodegenBoxTestGenerated.java @@ -4423,6 +4423,11 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { runTest("compiler/testData/codegen/box/companion/delegatedPropertyOnCompanion.kt"); } + @TestMetadata("genericLambdaOnStringCompanion.kt") + public void testGenericLambdaOnStringCompanion() throws Exception { + runTest("compiler/testData/codegen/box/companion/genericLambdaOnStringCompanion.kt"); + } + @TestMetadata("inlineFunctionCompanionPropertyAccess.kt") public void testInlineFunctionCompanionPropertyAccess() throws Exception { runTest("compiler/testData/codegen/box/companion/inlineFunctionCompanionPropertyAccess.kt"); diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/wasm/semantics/IrCodegenBoxWasmTestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/wasm/semantics/IrCodegenBoxWasmTestGenerated.java index dd39e451b68..6af89a38cfd 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/wasm/semantics/IrCodegenBoxWasmTestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/wasm/semantics/IrCodegenBoxWasmTestGenerated.java @@ -4379,6 +4379,11 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest runTest("compiler/testData/codegen/box/companion/delegatedPropertyOnCompanion.kt"); } + @TestMetadata("genericLambdaOnStringCompanion.kt") + public void testGenericLambdaOnStringCompanion() throws Exception { + runTest("compiler/testData/codegen/box/companion/genericLambdaOnStringCompanion.kt"); + } + @TestMetadata("inlineFunctionCompanionPropertyAccess.kt") public void testInlineFunctionCompanionPropertyAccess() throws Exception { runTest("compiler/testData/codegen/box/companion/inlineFunctionCompanionPropertyAccess.kt");