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.
Original commit: 06101dba52
This commit is contained in:
+2
-2
@@ -9,7 +9,7 @@ End of files
|
|||||||
Exit code: ABORT
|
Exit code: ABORT
|
||||||
------------------------------------------
|
------------------------------------------
|
||||||
COMPILATION FAILED
|
COMPILATION FAILED
|
||||||
'public constructor A(x: String)' conflicts with another declaration in package '<root>'
|
Conflicting overloads: public constructor A(x: String) defined in A, public fun A(x: String): A defined in root package
|
||||||
|
|
||||||
================ Step #2 =================
|
================ Step #2 =================
|
||||||
|
|
||||||
@@ -41,4 +41,4 @@ Compiling files:
|
|||||||
src/useA.kt
|
src/useA.kt
|
||||||
End of files
|
End of files
|
||||||
Exit code: OK
|
Exit code: OK
|
||||||
------------------------------------------
|
------------------------------------------
|
||||||
@@ -16,4 +16,4 @@ Exit code: ABORT
|
|||||||
------------------------------------------
|
------------------------------------------
|
||||||
COMPILATION FAILED
|
COMPILATION FAILED
|
||||||
Redeclaration: Klass
|
Redeclaration: Klass
|
||||||
Redeclaration: Klass
|
Redeclaration: Klass
|
||||||
@@ -10,4 +10,4 @@ End of files
|
|||||||
Exit code: ABORT
|
Exit code: ABORT
|
||||||
------------------------------------------
|
------------------------------------------
|
||||||
COMPILATION FAILED
|
COMPILATION FAILED
|
||||||
'public fun function(): Unit' conflicts with another declaration in package 'test'
|
Conflicting overloads: public fun function(): Unit defined in test, public fun function(): Unit defined in test
|
||||||
+1
-1
@@ -10,4 +10,4 @@ End of files
|
|||||||
Exit code: ABORT
|
Exit code: ABORT
|
||||||
------------------------------------------
|
------------------------------------------
|
||||||
COMPILATION FAILED
|
COMPILATION FAILED
|
||||||
'public constructor function()' conflicts with another declaration in package 'test'
|
Conflicting overloads: public constructor function() defined in test.function, public fun function(): Unit defined in test
|
||||||
@@ -10,4 +10,4 @@ End of files
|
|||||||
Exit code: ABORT
|
Exit code: ABORT
|
||||||
------------------------------------------
|
------------------------------------------
|
||||||
COMPILATION FAILED
|
COMPILATION FAILED
|
||||||
Redeclaration: property
|
Conflicting declarations: public val property: Int, public val property: Int
|
||||||
Reference in New Issue
Block a user