[FIR] Fix incorrect psi provided to checker
^KT-60343 fixed
This commit is contained in:
+6
@@ -717,6 +717,12 @@ public class DiagnosticCompilerTestFE10TestdataTestGenerated extends AbstractDia
|
||||
runTest("compiler/testData/diagnostics/tests/kt58583.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("Kt60343.kt")
|
||||
public void testKt60343() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/Kt60343.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt60638.kt")
|
||||
public void testKt60638() throws Exception {
|
||||
|
||||
+6
@@ -717,6 +717,12 @@ public class LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated
|
||||
runTest("compiler/testData/diagnostics/tests/kt58583.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("Kt60343.kt")
|
||||
public void testKt60343() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/Kt60343.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt60638.kt")
|
||||
public void testKt60638() throws Exception {
|
||||
|
||||
+6
@@ -717,6 +717,12 @@ public class FirLightTreeOldFrontendDiagnosticsTestGenerated extends AbstractFir
|
||||
runTest("compiler/testData/diagnostics/tests/kt58583.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("Kt60343.kt")
|
||||
public void testKt60343() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/Kt60343.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt60638.kt")
|
||||
public void testKt60638() throws Exception {
|
||||
|
||||
+6
@@ -717,6 +717,12 @@ public class FirPsiOldFrontendDiagnosticsTestGenerated extends AbstractFirPsiDia
|
||||
runTest("compiler/testData/diagnostics/tests/kt58583.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("Kt60343.kt")
|
||||
public void testKt60343() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/Kt60343.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt60638.kt")
|
||||
public void testKt60638() throws Exception {
|
||||
|
||||
+1
-1
@@ -37,7 +37,7 @@ object FirTypeParameterInQualifiedAccessChecker : FirQualifiedAccessExpressionCh
|
||||
if (secondLast is FirQualifiedAccessExpression && secondLast.explicitReceiver == expression) return
|
||||
|
||||
val diagnostic = expression.coneTypeOrNull?.coneTypeParameterInQualifiedAccess ?: return
|
||||
val source = expression.source ?: return
|
||||
val source = expression.calleeReference.source ?: return
|
||||
reporter.reportOn(source, FirErrors.TYPE_PARAMETER_IS_NOT_AN_EXPRESSION, diagnostic.symbol, context)
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
fun <T> test(x: Any) {
|
||||
<!UNRESOLVED_REFERENCE!>println<!>(<!EXPLICIT_TYPE_ARGUMENTS_IN_PROPERTY_ACCESS, TYPE_PARAMETER_IS_NOT_AN_EXPRESSION!>T<!><T>)
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fun <T> test(x: Any) {
|
||||
<!UNRESOLVED_REFERENCE!>println<!>(<!RESOLUTION_TO_CLASSIFIER!>T<!><T>)
|
||||
}
|
||||
Generated
+6
@@ -717,6 +717,12 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest {
|
||||
runTest("compiler/testData/diagnostics/tests/kt58583.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("Kt60343.kt")
|
||||
public void testKt60343() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/Kt60343.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt60638.kt")
|
||||
public void testKt60638() throws Exception {
|
||||
|
||||
Reference in New Issue
Block a user