8c95884ad2
Extract single point of entry for all change signature refactorings and fixes (remove parameter, add parameter) Change signature now affects overriding functions as well Ask the user whether he wants to refactor base function(s) or the selected one if appropiate Fix a problem with descriptorToDeclaration in JetChangeSignatureHandler Rename: JetFunctionPlatformDescriptor -> JetMethodDescriptor
59 lines
603 B
Kotlin
59 lines
603 B
Kotlin
// "Remove parameter 'a'" "true"
|
|
trait OA {
|
|
fun f(a: Int)
|
|
}
|
|
|
|
trait OB {
|
|
fun f(a: Int)
|
|
}
|
|
|
|
trait O : OA, OB {
|
|
override fun f(a: Int)
|
|
}
|
|
|
|
trait OO : O {
|
|
override fun f(a: Int) {
|
|
}
|
|
}
|
|
|
|
trait OOO : OO {
|
|
override fun f(a: Int) {}
|
|
}
|
|
|
|
trait OOOA : OOO {
|
|
override fun f(a: Int) {
|
|
}
|
|
}
|
|
|
|
trait OOOB : OOO {
|
|
override fun f(a: Int) {
|
|
}
|
|
}
|
|
|
|
fun usage(o: OA) {
|
|
o.f(<caret>)
|
|
}
|
|
fun usage(o: OB) {
|
|
o.f(1)
|
|
}
|
|
|
|
fun usage(o: O) {
|
|
o.f(1)
|
|
}
|
|
|
|
fun usage(o: OO) {
|
|
o.f(13)
|
|
}
|
|
|
|
fun usage(o: OOO) {
|
|
o.f(3)
|
|
}
|
|
|
|
fun usage(o: OOOA) {
|
|
o.f(3)
|
|
}
|
|
|
|
fun usage(o: OOOB) {
|
|
o.f(3)
|
|
}
|