Record special descriptor in REFERENCE_TARGET for type alias object
If a type alias is used to reference an object (companion object) as a qualifier, record FakeCallableDescriptorForTypeAliasObject in REFERENCE_TARGET. This tells IDE that type alias was used in the file, thus, if it's imported, such import isn't redundant. REFERENCE_TARGET is used mostly by IDE and by ClassifierUsageChecker, which we also have to update to handle qualifiers with FakeCallableDescriptorForTypeAliasObject in REFERENCE_TARGET. Rewrite some parts of ClassifierUsageChecker for cleaner interaction. #KT-21863 Fixed Target versions 1.2.40
This commit is contained in:
@@ -21465,6 +21465,12 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest {
|
||||
runTest("compiler/testData/diagnostics/tests/typealias/import.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("importForTypealiasObject.kt")
|
||||
public void testImportForTypealiasObject() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/importForTypealiasObject.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("importFromTypeAliasObject.kt")
|
||||
public void testImportFromTypeAliasObject() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/typealias/importFromTypeAliasObject.kt");
|
||||
|
||||
Generated
+6
@@ -21465,6 +21465,12 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing
|
||||
runTest("compiler/testData/diagnostics/tests/typealias/import.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("importForTypealiasObject.kt")
|
||||
public void testImportForTypealiasObject() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/importForTypealiasObject.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("importFromTypeAliasObject.kt")
|
||||
public void testImportFromTypeAliasObject() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/typealias/importFromTypeAliasObject.kt");
|
||||
|
||||
Reference in New Issue
Block a user