Files
kotlin-fork/idea/testData/codeInsight/overrideImplement/ambiguousSuper.kt.after
T
Dmitry Petrov 06101dba52 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.
2016-10-03 11:50:29 +03:00

31 lines
709 B
Plaintext
Vendored

// ERROR: Conflicting overloads: public open fun foo(): Unit defined in C, public open fun foo(): Unit defined in C
// ERROR: Conflicting overloads: public open fun foo(): Unit defined in C, public open fun foo(): Unit defined in C
interface I {
open fun foo(){}
}
open class A {
open fun foo(){}
}
class C : A(), I {
override fun equals(other: Any?): Boolean {
<selection><caret>return super.equals(other)</selection>
}
override fun foo() {
super<A>.foo()
}
override fun foo() {
super<I>.foo()
}
override fun hashCode(): Int {
return super.hashCode()
}
override fun toString(): String {
return super.toString()
}
}