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:
Alexander Udalov
2021-09-29 16:17:01 +02:00
parent e6a160e115
commit 9857af7823
18 changed files with 173 additions and 2 deletions
@@ -1636,6 +1636,11 @@ public class KlibTextTestCaseGenerated extends AbstractKlibTextTestCase {
runTest("compiler/testData/ir/irText/expressions/funInterface/castFromAny.kt");
}
@TestMetadata("functionSupertype.kt")
public void testFunctionSupertype() throws Exception {
runTest("compiler/testData/ir/irText/expressions/funInterface/functionSupertype.kt");
}
@TestMetadata("partialSam.kt")
public void testPartialSam() throws Exception {
runTest("compiler/testData/ir/irText/expressions/funInterface/partialSam.kt");