test(KT-47806): add tests for the uncovered behavior for generic companion function extensions.
This commit is contained in:
+6
@@ -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 {
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
fun <T> 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"
|
||||
}
|
||||
+6
@@ -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 {
|
||||
|
||||
+6
@@ -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 {
|
||||
|
||||
+5
@@ -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");
|
||||
|
||||
js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/es6/semantics/IrJsCodegenBoxES6TestGenerated.java
Generated
+5
@@ -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");
|
||||
|
||||
Generated
+5
@@ -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");
|
||||
|
||||
Generated
+5
@@ -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");
|
||||
|
||||
js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/wasm/semantics/IrCodegenBoxWasmTestGenerated.java
Generated
+5
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user