K2: add test for KT-56520, cases (1), (5), (6), type references

In both these situations, we have some.HashMap & java.util.HashMap
from explicit star importing scope, and kotlin.collections.HashMap
from implicit star importing scope after it.
K1 ignores both explicitly imported classifiers due to their ambiguity,
and then resolves to kotlin.collections.HashMap at the next level.
In contrast, K2 takes explicitly imported classifiers and
properly reports ambiguity.
This commit is contained in:
Mikhail Glukhikh
2023-10-26 14:59:30 +02:00
committed by Space Team
parent d07f3a14e6
commit 6fb88102a5
9 changed files with 178 additions and 0 deletions
@@ -44772,6 +44772,12 @@ public class DiagnosticCompilerTestFE10TestdataTestGenerated extends AbstractDia
public void testConstructorCaseSpace() throws Exception {
runTest("compiler/testData/diagnostics/testsWithStdLib/resolve/ambiguousTypeReferences/constructorCaseSpace.kt");
}
@Test
@TestMetadata("typeCase.kt")
public void testTypeCase() throws Exception {
runTest("compiler/testData/diagnostics/testsWithStdLib/resolve/ambiguousTypeReferences/typeCase.kt");
}
}
}
@@ -44772,6 +44772,12 @@ public class LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated
public void testConstructorCaseSpace() throws Exception {
runTest("compiler/testData/diagnostics/testsWithStdLib/resolve/ambiguousTypeReferences/constructorCaseSpace.kt");
}
@Test
@TestMetadata("typeCase.kt")
public void testTypeCase() throws Exception {
runTest("compiler/testData/diagnostics/testsWithStdLib/resolve/ambiguousTypeReferences/typeCase.kt");
}
}
}