Psi2ir: fix function type check for fun interface conversion
Parameter of a synthetic SAM adapter always has a function type (not a subtype). Checking for the subtypes broke the case from KT-46908, where fun interface is itself a subtype of a function type. #KT-46908 Fixed
This commit is contained in:
js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/es6/semantics/IrJsCodegenBoxES6TestGenerated.java
Generated
+5
@@ -11905,6 +11905,11 @@ public class IrJsCodegenBoxES6TestGenerated extends AbstractIrJsCodegenBoxES6Tes
|
||||
runTest("compiler/testData/codegen/box/funInterface/kt46512_indyFunInterfaceOverCallableReference.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt46908_functionSupertype.kt")
|
||||
public void testKt46908_functionSupertype() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/funInterface/kt46908_functionSupertype.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("multimodule.kt")
|
||||
public void testMultimodule() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/funInterface/multimodule.kt");
|
||||
|
||||
Generated
+5
@@ -11311,6 +11311,11 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
|
||||
runTest("compiler/testData/codegen/box/funInterface/kt46512_indyFunInterfaceOverCallableReference.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt46908_functionSupertype.kt")
|
||||
public void testKt46908_functionSupertype() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/funInterface/kt46908_functionSupertype.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("multimodule.kt")
|
||||
public void testMultimodule() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/funInterface/multimodule.kt");
|
||||
|
||||
Generated
+5
@@ -11276,6 +11276,11 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
|
||||
runTest("compiler/testData/codegen/box/funInterface/kt46512_indyFunInterfaceOverCallableReference.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt46908_functionSupertype.kt")
|
||||
public void testKt46908_functionSupertype() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/funInterface/kt46908_functionSupertype.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("multimodule.kt")
|
||||
public void testMultimodule() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/funInterface/multimodule.kt");
|
||||
|
||||
js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/wasm/semantics/IrCodegenBoxWasmTestGenerated.java
Generated
+5
@@ -6640,6 +6640,11 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest
|
||||
runTest("compiler/testData/codegen/box/funInterface/kt46512_indyFunInterfaceOverCallableReference.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt46908_functionSupertype.kt")
|
||||
public void testKt46908_functionSupertype() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/funInterface/kt46908_functionSupertype.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/funInterface/equality")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
|
||||
Reference in New Issue
Block a user