Report conflicting overloads for constructors
- It's worked almost fine but diagnostics were filtered out by positioning strategy. - Also a couple of "put" calls to Multimap are replaced by "putValues" within OverloadResolver, that is more semantically correct. - Note that constructors of top-level classes are handled when processing package, it helps to figure out if there are clashes with top-level functions that have the same name. - But constructors of different classes are not reported as overloads because containing classes has the same name and will be reported as redeclaration.
This commit is contained in:
@@ -10547,6 +10547,18 @@ public class JetDiagnosticsTestGenerated extends AbstractJetDiagnosticsTest {
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("redeclarations.kt")
|
||||
public void testRedeclarations() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/secondaryConstructors/redeclarations.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("redeclarationsOfConstructorsIgnored.kt")
|
||||
public void testRedeclarationsOfConstructorsIgnored() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/secondaryConstructors/redeclarationsOfConstructorsIgnored.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("resolvePropertyInitializerWithoutPrimary.kt")
|
||||
public void testResolvePropertyInitializerWithoutPrimary() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/secondaryConstructors/resolvePropertyInitializerWithoutPrimary.kt");
|
||||
|
||||
Reference in New Issue
Block a user