Fix KT-10764 IDEA doesn't show overload conflict between constructor and function...
When checking for overloads in package, consider functions and top-level class constructors as possibly conflicting between each other. NB OverloadUtil uses containing package scope from module descriptor. Change diagnostic message for CONFLICTING_OVERLOAD: it's misleading in case of fun vs constructor conflict. Add custom multifile test for diagnostics in IDE (probably not the best; should preprocess file content if it's required to check highlighting in multiple files, not only in the first file). Add test for KT-10765 Incremental compilation misses overload conflict between constructor and function ...
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
class A<error>(val x: Int)</error> {
|
||||
<error>constructor()</error>: this(0)
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fun A() {}
|
||||
fun A(x: Int) = x
|
||||
@@ -0,0 +1,2 @@
|
||||
<error>fun A()</error> {}
|
||||
<error>fun A(x: Int)</error> = x
|
||||
@@ -0,0 +1,3 @@
|
||||
class A(val x: Int) {
|
||||
constructor(): this(0)
|
||||
}
|
||||
Reference in New Issue
Block a user