KT-13961 REDECLARATION not reported on private-in-file 'foo' vs public 'foo' in different file

Private-in-file declarations conflict with public overload-equivalent declarations
in other files in the same package.

Move functions for grouping possible redeclarations to OverloadResolver
(since they are used only there).

Refactor redeclarations / conflicting overloads reporting.
This commit is contained in:
Dmitry Petrov
2016-09-21 18:12:24 +03:00
parent 0120085443
commit 06101dba52
42 changed files with 293 additions and 297 deletions
@@ -1,15 +1,15 @@
// FILE: f.kt
package redeclarations
object <!REDECLARATION, REDECLARATION!>A<!> {
object <!PACKAGE_OR_CLASSIFIER_REDECLARATION, REDECLARATION!>A<!> {
val x : Int = 0
val A = 1
}
class <!REDECLARATION!>A<!> {}
class <!PACKAGE_OR_CLASSIFIER_REDECLARATION!>A<!> {}
val <!REDECLARATION, REDECLARATION!>A<!> = 1
val <!PACKAGE_OR_CLASSIFIER_REDECLARATION, REDECLARATION!>A<!> = 1
// FILE: f.kt
package redeclarations.<!REDECLARATION!>A<!>
package redeclarations.<!PACKAGE_OR_CLASSIFIER_REDECLARATION!>A<!>
class A {}