[FIR] Properly resolve implicit invoke calls
#KT-41990 Fixed
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
// ISSUE: KT-41990
|
||||
|
||||
fun getLambda(): String.() -> Unit = null!!
|
||||
|
||||
fun String.test_1(s: String) {
|
||||
getLambda()()
|
||||
getLambda()(s)
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
FILE: kt41990.kt
|
||||
public final fun getLambda(): R|kotlin/String.() -> kotlin/Unit| {
|
||||
^getLambda Null(null)!!
|
||||
}
|
||||
public final fun R|kotlin/String|.test_1(s: R|kotlin/String|): R|kotlin/Unit| {
|
||||
R|/getLambda|().R|FakeOverride<kotlin/Function1.invoke: R|kotlin/Unit|>|(this@R|/test_1|)
|
||||
R|/getLambda|().R|FakeOverride<kotlin/Function1.invoke: R|kotlin/Unit|>|(R|<local>/s|)
|
||||
}
|
||||
Generated
+5
@@ -243,6 +243,11 @@ public class FirDiagnosticsTestGenerated extends AbstractFirDiagnosticsTest {
|
||||
runTest("compiler/fir/analysis-tests/testData/resolve/javaStaticScopeInheritance.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt41990.kt")
|
||||
public void testKt41990() throws Exception {
|
||||
runTest("compiler/fir/analysis-tests/testData/resolve/kt41990.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("labelAndReceiverForInfix.kt")
|
||||
public void testLabelAndReceiverForInfix() throws Exception {
|
||||
runTest("compiler/fir/analysis-tests/testData/resolve/labelAndReceiverForInfix.kt");
|
||||
|
||||
+5
@@ -243,6 +243,11 @@ public class FirDiagnosticsWithLightTreeTestGenerated extends AbstractFirDiagnos
|
||||
runTest("compiler/fir/analysis-tests/testData/resolve/javaStaticScopeInheritance.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt41990.kt")
|
||||
public void testKt41990() throws Exception {
|
||||
runTest("compiler/fir/analysis-tests/testData/resolve/kt41990.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("labelAndReceiverForInfix.kt")
|
||||
public void testLabelAndReceiverForInfix() throws Exception {
|
||||
runTest("compiler/fir/analysis-tests/testData/resolve/labelAndReceiverForInfix.kt");
|
||||
|
||||
Reference in New Issue
Block a user