FIR checker: report unresolved reference in imports

Compared to FE1.0, instead of using UNRESOLVED_REFERENCE, a new
UNRESOLVED_IMPORT diagnostic is introduced. This is so that we can use a
different positioning strategy to highlight the last part of the import
if the entire import is passed.

Also, this change fixed some incorrectly rejected imports in FIR. Such
cases are covered the newly added test file staticFunAndPropertyImport.kt
This commit is contained in:
Tianyu Geng
2021-10-25 17:37:38 -07:00
committed by teamcityserver
parent f51b108821
commit 18f7a760bb
33 changed files with 470 additions and 95 deletions
@@ -26011,6 +26011,12 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti
runTest("compiler/testData/diagnostics/tests/scopes/inheritance/statics/overloadStatic.kt");
}
@Test
@TestMetadata("staticFunAndPropertyImport.kt")
public void testStaticFunAndPropertyImport() throws Exception {
runTest("compiler/testData/diagnostics/tests/scopes/inheritance/statics/staticFunAndPropertyImport.kt");
}
@Test
@TestMetadata("staticFunVsImport.kt")
public void testStaticFunVsImport() throws Exception {
@@ -26011,6 +26011,12 @@ public class FirOldFrontendDiagnosticsWithLightTreeTestGenerated extends Abstrac
runTest("compiler/testData/diagnostics/tests/scopes/inheritance/statics/overloadStatic.kt");
}
@Test
@TestMetadata("staticFunAndPropertyImport.kt")
public void testStaticFunAndPropertyImport() throws Exception {
runTest("compiler/testData/diagnostics/tests/scopes/inheritance/statics/staticFunAndPropertyImport.kt");
}
@Test
@TestMetadata("staticFunVsImport.kt")
public void testStaticFunVsImport() throws Exception {