[FIR] add missing resolve for ConeFunctionExpectedError building
^KT-60638 Fixed
This commit is contained in:
committed by
Space Team
parent
ba7e6ff154
commit
d93ffe0aec
+6
@@ -651,6 +651,12 @@ public class FirLightTreeOldFrontendDiagnosticsTestGenerated extends AbstractFir
|
||||
runTest("compiler/testData/diagnostics/tests/kt58583.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt60638.kt")
|
||||
public void testKt60638() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/kt60638.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("LValueAssignment.kt")
|
||||
public void testLValueAssignment() throws Exception {
|
||||
|
||||
+6
@@ -651,6 +651,12 @@ public class FirPsiOldFrontendDiagnosticsTestGenerated extends AbstractFirPsiDia
|
||||
runTest("compiler/testData/diagnostics/tests/kt58583.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt60638.kt")
|
||||
public void testKt60638() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/kt60638.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("LValueAssignment.kt")
|
||||
public void testLValueAssignment() throws Exception {
|
||||
|
||||
@@ -717,7 +717,9 @@ class FirCallResolver(
|
||||
coneType != null && !coneType.isUnit -> {
|
||||
ConeFunctionExpectedError(
|
||||
name.asString(),
|
||||
(fir as? FirCallableDeclaration)?.returnTypeRef?.coneType ?: coneType
|
||||
(fir as? FirCallableDeclaration)?.let {
|
||||
components.returnTypeCalculator.tryCalculateReturnType(it)
|
||||
}?.coneType ?: coneType
|
||||
)
|
||||
}
|
||||
singleExpectedCandidate != null && !singleExpectedCandidate.currentApplicability.isSuccess -> {
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
package usage
|
||||
|
||||
class MyType
|
||||
class MyClass
|
||||
val MyClass.isInterface get() = 4
|
||||
|
||||
fun usage(type: MyType) {
|
||||
type.<!FUNCTION_EXPECTED!>isInterface<!>()
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package usage
|
||||
|
||||
class MyType
|
||||
class MyClass
|
||||
val MyClass.isInterface get() = 4
|
||||
|
||||
fun usage(type: MyType) {
|
||||
type.<!FUNCTION_EXPECTED, UNRESOLVED_REFERENCE_WRONG_RECEIVER!>isInterface<!>()
|
||||
}
|
||||
Generated
+6
@@ -651,6 +651,12 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest {
|
||||
runTest("compiler/testData/diagnostics/tests/kt58583.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt60638.kt")
|
||||
public void testKt60638() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/kt60638.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("LValueAssignment.kt")
|
||||
public void testLValueAssignment() throws Exception {
|
||||
|
||||
Reference in New Issue
Block a user