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:
Denis Zharkov
2015-03-04 19:02:09 +03:00
parent 9d2d3c0c7b
commit 5eb4dcd913
7 changed files with 153 additions and 7 deletions
@@ -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");