[JS IR] Add test with fun interface call inside lambda
^KT-44433 fixed
This commit is contained in:
+6
@@ -14772,6 +14772,12 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT
|
||||
runTest("compiler/testData/codegen/box/funInterface/funConversionInVararg.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("funInterfaceCallInLambda.kt")
|
||||
public void testFunInterfaceCallInLambda() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/funInterface/funInterfaceCallInLambda.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("funInterfaceInheritance.kt")
|
||||
public void testFunInterfaceInheritance() throws Exception {
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
// DONT_TARGET_EXACT_BACKEND: WASM
|
||||
|
||||
fun interface Action {
|
||||
fun run()
|
||||
}
|
||||
|
||||
fun runAction(a: Action) {
|
||||
a.run()
|
||||
}
|
||||
|
||||
fun builder(c: () -> Unit) {
|
||||
c()
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
var res = "FAIL"
|
||||
builder {
|
||||
runAction {
|
||||
res = "OK"
|
||||
}
|
||||
}
|
||||
return res
|
||||
}
|
||||
+6
@@ -14772,6 +14772,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
|
||||
runTest("compiler/testData/codegen/box/funInterface/funConversionInVararg.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("funInterfaceCallInLambda.kt")
|
||||
public void testFunInterfaceCallInLambda() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/funInterface/funInterfaceCallInLambda.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("funInterfaceInheritance.kt")
|
||||
public void testFunInterfaceInheritance() throws Exception {
|
||||
|
||||
+6
@@ -14772,6 +14772,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
|
||||
runTest("compiler/testData/codegen/box/funInterface/funConversionInVararg.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("funInterfaceCallInLambda.kt")
|
||||
public void testFunInterfaceCallInLambda() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/funInterface/funInterfaceCallInLambda.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("funInterfaceInheritance.kt")
|
||||
public void testFunInterfaceInheritance() throws Exception {
|
||||
|
||||
+5
@@ -12219,6 +12219,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
|
||||
runTest("compiler/testData/codegen/box/funInterface/funConversionInVararg.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("funInterfaceCallInLambda.kt")
|
||||
public void testFunInterfaceCallInLambda() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/funInterface/funInterfaceCallInLambda.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("funInterfaceInheritance.kt")
|
||||
public void testFunInterfaceInheritance() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/funInterface/funInterfaceInheritance.kt");
|
||||
|
||||
js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/es6/semantics/IrJsCodegenBoxES6TestGenerated.java
Generated
+5
@@ -10909,6 +10909,11 @@ public class IrJsCodegenBoxES6TestGenerated extends AbstractIrJsCodegenBoxES6Tes
|
||||
runTest("compiler/testData/codegen/box/funInterface/funConversionInVararg.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("funInterfaceCallInLambda.kt")
|
||||
public void testFunInterfaceCallInLambda() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/funInterface/funInterfaceCallInLambda.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("funInterfaceInheritance.kt")
|
||||
public void testFunInterfaceInheritance() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/funInterface/funInterfaceInheritance.kt");
|
||||
|
||||
Generated
+5
@@ -10394,6 +10394,11 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
|
||||
runTest("compiler/testData/codegen/box/funInterface/funConversionInVararg.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("funInterfaceCallInLambda.kt")
|
||||
public void testFunInterfaceCallInLambda() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/funInterface/funInterfaceCallInLambda.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("funInterfaceInheritance.kt")
|
||||
public void testFunInterfaceInheritance() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/funInterface/funInterfaceInheritance.kt");
|
||||
|
||||
Generated
+5
@@ -10394,6 +10394,11 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
|
||||
runTest("compiler/testData/codegen/box/funInterface/funConversionInVararg.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("funInterfaceCallInLambda.kt")
|
||||
public void testFunInterfaceCallInLambda() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/funInterface/funInterfaceCallInLambda.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("funInterfaceInheritance.kt")
|
||||
public void testFunInterfaceInheritance() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/funInterface/funInterfaceInheritance.kt");
|
||||
|
||||
Reference in New Issue
Block a user