KT-9547: private package member can conflict only with the members
declared in the same file. Cleanup OverloadUtil stuff. Update testData.
This commit is contained in:
@@ -11931,6 +11931,12 @@ public class JetDiagnosticsTestGenerated extends AbstractJetDiagnosticsTest {
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("RedeclaringPrivateToFile.kt")
|
||||
public void testRedeclaringPrivateToFile() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/redeclarations/RedeclaringPrivateToFile.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("SingletonAndFunctionSameName.kt")
|
||||
public void testSingletonAndFunctionSameName() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/redeclarations/SingletonAndFunctionSameName.kt");
|
||||
|
||||
@@ -161,14 +161,12 @@ public class JetOverloadTest extends JetLiteFixture {
|
||||
private void assertOverloadabilityRelation(String funA, String funB, boolean expectedIsError) {
|
||||
FunctionDescriptor a = makeFunction(funA);
|
||||
FunctionDescriptor b = makeFunction(funB);
|
||||
{
|
||||
OverloadUtil.OverloadCompatibilityInfo overloadableWith = OverloadUtil.isOverloadable(a, b);
|
||||
assertEquals(overloadableWith.getMessage(), expectedIsError, !overloadableWith.isSuccess());
|
||||
}
|
||||
{
|
||||
OverloadUtil.OverloadCompatibilityInfo overloadableWith = OverloadUtil.isOverloadable(b, a);
|
||||
assertEquals(overloadableWith.getMessage(), expectedIsError, !overloadableWith.isSuccess());
|
||||
}
|
||||
|
||||
boolean aOverloadableWithB = OverloadUtil.isOverloadable(a, b);
|
||||
assertEquals(expectedIsError, !aOverloadableWithB);
|
||||
|
||||
boolean bOverloadableWithA = OverloadUtil.isOverloadable(b, a);
|
||||
assertEquals(expectedIsError, !bOverloadableWithA);
|
||||
}
|
||||
|
||||
private FunctionDescriptor makeFunction(String funDecl) {
|
||||
|
||||
Reference in New Issue
Block a user