K2: add test for KT-56520, case (2), constructors, Space subcase

In this test, both frontends resolve to fun Semaphore.
Both work this way because interface/class Semaphore classifiers are
clashed (ambiguity) and ignored.
K2 reports ambiguity for some similar cases,
but constructor resolve still ignores ambiguous classifiers when found.
(see FirScope.processConstructorsByName in ConstructorProcessing.kt)
This commit is contained in:
Mikhail Glukhikh
2023-10-26 14:14:05 +02:00
committed by Space Team
parent 6049f8657b
commit d07f3a14e6
10 changed files with 128 additions and 2 deletions
@@ -44766,6 +44766,12 @@ public class DiagnosticCompilerTestFE10TestdataTestGenerated extends AbstractDia
public void testConstructorCase() throws Exception {
runTest("compiler/testData/diagnostics/testsWithStdLib/resolve/ambiguousTypeReferences/constructorCase.kt");
}
@Test
@TestMetadata("constructorCaseSpace.kt")
public void testConstructorCaseSpace() throws Exception {
runTest("compiler/testData/diagnostics/testsWithStdLib/resolve/ambiguousTypeReferences/constructorCaseSpace.kt");
}
}
}
@@ -44766,6 +44766,12 @@ public class LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated
public void testConstructorCase() throws Exception {
runTest("compiler/testData/diagnostics/testsWithStdLib/resolve/ambiguousTypeReferences/constructorCase.kt");
}
@Test
@TestMetadata("constructorCaseSpace.kt")
public void testConstructorCaseSpace() throws Exception {
runTest("compiler/testData/diagnostics/testsWithStdLib/resolve/ambiguousTypeReferences/constructorCaseSpace.kt");
}
}
}