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
-4
@@ -1,8 +1,8 @@
|
||||
// "Add constructor parameters from Base(Int, Int, Any, String, String,...)" "true"
|
||||
// ERROR: Redeclaration: p4
|
||||
// ERROR: Redeclaration: p4
|
||||
// ERROR: Redeclaration: p4
|
||||
// ERROR: Redeclaration: p4
|
||||
// ERROR: Conflicting declarations: value-parameter p4: Any, value-parameter p4: String
|
||||
// ERROR: Conflicting declarations: value-parameter p4: Any, value-parameter p4: String
|
||||
// ERROR: Conflicting declarations: value-parameter p4: Any, value-parameter p4: String
|
||||
// ERROR: Conflicting declarations: value-parameter p4: Any, value-parameter p4: String
|
||||
open class Base<T>(p1: Int, private val p2: Int, p3: Any, p4: String, p5: T, p6: Int)
|
||||
|
||||
class C(p: Int, p2: Int, p3: String, p4: Any, p5: String, val p6: Int) : Base<String><caret>
|
||||
|
||||
+5
-5
@@ -1,8 +1,8 @@
|
||||
// "Add constructor parameters from Base(Int, Int, Any, String, String,...)" "true"
|
||||
// ERROR: Redeclaration: p4
|
||||
// ERROR: Redeclaration: p4
|
||||
// ERROR: Redeclaration: p4
|
||||
// ERROR: Redeclaration: p4
|
||||
// ERROR: Conflicting declarations: value-parameter p4: Any, value-parameter p4: String
|
||||
// ERROR: Conflicting declarations: value-parameter p4: Any, value-parameter p4: String
|
||||
// ERROR: Conflicting declarations: value-parameter p4: Any, value-parameter p4: String
|
||||
// ERROR: Conflicting declarations: value-parameter p4: Any, value-parameter p4: String
|
||||
open class Base<T>(p1: Int, private val p2: Int, p3: Any, p4: String, p5: T, p6: Int)
|
||||
|
||||
class C(p: Int, p2: Int, p3: String, p4: Any, p5: String, val p6: Int, p1: Int, p4: String) : Base<String><caret>(p1, p2, p3, p4, p5, p6)
|
||||
class C(p: Int, p2: Int, p3: String, p4: Any, p5: String, val p6: Int, p1: Int, p4: String) : Base<String>(p1, p2, p3, p4, p5, p6)
|
||||
|
||||
Reference in New Issue
Block a user