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:
+4
-2
@@ -4,7 +4,7 @@
|
||||
|
||||
import a.*
|
||||
|
||||
fun box(): String = overlapping
|
||||
fun box(): String = ok()
|
||||
|
||||
// FILE: part1.kt
|
||||
@file:[JvmName("MultifileClass") JvmMultifileClass]
|
||||
@@ -16,7 +16,9 @@ private val overlapping = run { "oops #1" }
|
||||
@file:[JvmName("MultifileClass") JvmMultifileClass]
|
||||
package a
|
||||
|
||||
val overlapping = run { "OK" }
|
||||
private val overlapping = run { "OK" }
|
||||
|
||||
fun ok() = overlapping
|
||||
|
||||
// FILE: part3.kt
|
||||
@file:[JvmName("MultifileClass") JvmMultifileClass]
|
||||
|
||||
Reference in New Issue
Block a user