'Change parameter type' Quick-Fix: Use Change Signature API
#KT-9812 Fixed
This commit is contained in:
+11
@@ -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("")
|
||||
}
|
||||
+9
@@ -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>"")
|
||||
}
|
||||
Reference in New Issue
Block a user