Transform variable-as-function calls for extension functions
In the following code example fun test(f: Any.() -> Unit) = 42.f() front-end resolves variable-as-function call for 'f' as 'invoke' with signature 'Function1<Any, Unit>#Any.() -> Unit'. However, Function1<Any, Unit> has a single 'invoke' method with signature 'Function1<Any, Unit>#(Any) -> Unit'. This didn't cause any problems with loosely typed JVM and JS back-ends. However, in IR with symbols this means a reference to non-existing declaration.
This commit is contained in:
@@ -635,6 +635,12 @@ public class IrTextTestCaseGenerated extends AbstractIrTextTestCase {
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("extFunSafeInvoke.kt")
|
||||
public void testExtFunSafeInvoke() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/expressions/extFunSafeInvoke.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("extensionPropertyGetterCall.kt")
|
||||
public void testExtensionPropertyGetterCall() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/expressions/extensionPropertyGetterCall.kt");
|
||||
|
||||
Reference in New Issue
Block a user