KT-8542 Override dialog: only one class from hierarchy is shown

#KT-8542 Fixed
This commit is contained in:
Valentin Kipyatkov
2015-07-27 16:48:31 +03:00
parent 29379c061a
commit 63dc843c71
14 changed files with 439 additions and 310 deletions
@@ -0,0 +1,11 @@
interface I {
open fun foo(){}
}
open class A {
open fun foo(){}
}
class C : A(), I {
<caret>
}
@@ -0,0 +1,29 @@
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<A>.equals(other)</selection>
}
override fun foo() {
super<A>.foo()
}
override fun foo() {
super<I>.foo()
}
override fun hashCode(): Int {
return super<A>.hashCode()
}
override fun toString(): String {
return super<A>.toString()
}
}
@@ -0,0 +1,18 @@
open class A {
fun a(){}
fun b(){}
}
interface I {
fun b()
}
abstract class B : A() {
open fun f(){}
abstract fun g()
fun h(){}
}
class C : B(), I {
<caret>
}
@@ -0,0 +1,36 @@
open class A {
fun a(){}
fun b(){}
}
interface I {
fun b()
}
abstract class B : A() {
open fun f(){}
abstract fun g()
fun h(){}
}
class C : B(), I {
override fun equals(other: Any?): Boolean {
<selection><caret>return super<B>.equals(other)</selection>
}
override fun f() {
super<B>.f()
}
override fun g() {
throw UnsupportedOperationException()
}
override fun hashCode(): Int {
return super<B>.hashCode()
}
override fun toString(): String {
return super<B>.toString()
}
}
@@ -0,0 +1,21 @@
abstract class A : I1 {
open fun a(){}
}
interface I1 {
fun i1()
fun i()
}
interface I2 {
fun i2()
fun a()
}
interface I3 {
fun i()
}
abstract class B : I2, A(), I3 {
<caret>
}
@@ -0,0 +1,47 @@
abstract class A : I1 {
open fun a(){}
}
interface I1 {
fun i1()
fun i()
}
interface I2 {
fun i2()
fun a()
}
interface I3 {
fun i()
}
abstract class B : I2, A(), I3 {
override fun a() {
<selection><caret>super<A>.a()</selection>
}
override fun equals(other: Any?): Boolean {
return super<A>.equals(other)
}
override fun hashCode(): Int {
return super<A>.hashCode()
}
override fun i() {
throw UnsupportedOperationException()
}
override fun i1() {
throw UnsupportedOperationException()
}
override fun i2() {
throw UnsupportedOperationException()
}
override fun toString(): String {
return super<A>.toString()
}
}