K2: add test for KT-56520, case (3), class literals
Again, both frontends here ignored classifiers from explicit star imported scope (some.HashMap, java.util.HashMap) because of their ambiguity. In case of K2, it works so due to logic in BodyResolveComponents.resolveRootPartOfQualifier. This function is called to resolve qualifier without receiver, in case it's used as a receiver itself (::class counts as a selector equivalent).
This commit is contained in:
committed by
Space Team
parent
6fb88102a5
commit
22d083a7a9
+6
@@ -44761,6 +44761,12 @@ public class DiagnosticCompilerTestFE10TestdataTestGenerated extends AbstractDia
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/resolve/ambiguousTypeReferences"), Pattern.compile("^(.+)\\.(kt|kts)$"), Pattern.compile("^(.+)\\.(reversed|fir|ll)\\.kts?$"), true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("classLiteralCase.kt")
|
||||
public void testClassLiteralCase() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/resolve/ambiguousTypeReferences/classLiteralCase.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("constructorCase.kt")
|
||||
public void testConstructorCase() throws Exception {
|
||||
|
||||
+6
@@ -44761,6 +44761,12 @@ public class LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/resolve/ambiguousTypeReferences"), Pattern.compile("^(.+)\\.(kt|kts)$"), Pattern.compile("^(.+)\\.(reversed|fir|ll)\\.kts?$"), true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("classLiteralCase.kt")
|
||||
public void testClassLiteralCase() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/resolve/ambiguousTypeReferences/classLiteralCase.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("constructorCase.kt")
|
||||
public void testConstructorCase() throws Exception {
|
||||
|
||||
Reference in New Issue
Block a user