'Change parameter type' Quick-Fix: Use Change Signature API

#KT-9812 Fixed
This commit is contained in:
Alexey Sedunov
2015-12-23 18:59:08 +03:00
committed by Alexey
parent 9180a99342
commit 5b5e7fb9b7
6 changed files with 73 additions and 4 deletions
@@ -0,0 +1,11 @@
// "Change parameter 'a' type of function 'test.B.foo' to 'String'" "true"
package test;
import org.jetbrains.annotations.NotNull;
class J extends B {
@Override
void foo(@NotNull String a) {
super.foo(a);
}
}
@@ -0,0 +1,15 @@
// "Change parameter 'a' type of function 'test.B.foo' to 'String'" "true"
// DISABLE-ERRORS
package test
open class B {
open fun foo(a: String) {}
}
class C : B() {
override fun foo(a: String) = super.foo(a)
}
fun test(b: B) {
b.foo("")
}
@@ -0,0 +1,9 @@
// "Change parameter 'a' type of function 'test.B.foo' to 'String'" "true"
package test;
class J extends B {
@Override
void foo(int a) {
super.foo(a);
}
}
@@ -0,0 +1,15 @@
// "Change parameter 'a' type of function 'test.B.foo' to 'String'" "true"
// DISABLE-ERRORS
package test
open class B {
open fun foo(a: Int) {}
}
class C : B() {
override fun foo(a: Int) = super.foo(a)
}
fun test(b: B) {
b.foo(<caret>"")
}