new quick fixes: add parameter, remove parameter, change function literal signature
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
// "Add parameter to constructor 'Base'" "true"
|
||||
// DISABLE-ERRORS
|
||||
|
||||
open class Base(var x: Int,
|
||||
d: Double) {
|
||||
val y = Base(1, 2.5);
|
||||
|
||||
fun f() {
|
||||
val base = Base(1, 2.5);
|
||||
}
|
||||
}
|
||||
|
||||
open class Inherited(x: Int) : Base(1, 2.5) {}
|
||||
@@ -0,0 +1,10 @@
|
||||
// "Add parameter to function 'foo'" "true"
|
||||
// DISABLE-ERRORS
|
||||
|
||||
fun foo(x: Int,
|
||||
i: Int) {
|
||||
foo(, 4);
|
||||
foo(1, 4);
|
||||
foo(1, 4);
|
||||
foo(2, 4);
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
// "Change the signature of function 'foo'" "true"
|
||||
// DISABLE-ERRORS
|
||||
|
||||
fun foo(x: Double,
|
||||
i: Int,
|
||||
i1: Int,
|
||||
i2: Int) {
|
||||
foo(,, 5, 6);
|
||||
foo(1,, 5, 6);
|
||||
foo(1, 2.5, 5, 6);
|
||||
foo(1.5, 4, 5, 6);
|
||||
foo(2, 3, 5, 6);
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
// "Change the signature of function literal" "true"
|
||||
// DISABLE-ERRORS
|
||||
|
||||
fun f(x: Int, y: Int, z : () -> Int) {
|
||||
f(1, 2, {() -> x});
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
// "Change the signature of function literal" "true"
|
||||
// DISABLE-ERRORS
|
||||
|
||||
fun f(x: Int, y: Int, z : (Int, Int?, Any) -> Int) {
|
||||
f(1, 2, {(i: Int,
|
||||
i1: Int?,
|
||||
any: Any) -> x});
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
// "Remove parameter 'x'" "true"
|
||||
// DISABLE-ERRORS
|
||||
|
||||
open class Base() {
|
||||
val y = Base();
|
||||
|
||||
fun f() {
|
||||
val base = Base();
|
||||
}
|
||||
}
|
||||
|
||||
open class Inherited(x: Int) : Base() {}
|
||||
@@ -0,0 +1,9 @@
|
||||
// "Remove parameter 'x'" "true"
|
||||
// DISABLE-ERRORS
|
||||
|
||||
fun foo(y: Int) {
|
||||
foo();
|
||||
foo();
|
||||
foo(2);
|
||||
foo(3);
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
// "Remove parameter 'y'" "true"
|
||||
// DISABLE-ERRORS
|
||||
|
||||
fun foo(x: Int) {
|
||||
foo();
|
||||
foo(1);
|
||||
foo(1);
|
||||
foo(2);
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
// "Remove parameter 'y'" "true"
|
||||
// DISABLE-ERRORS
|
||||
|
||||
fun foo(x: Int) {
|
||||
foo();
|
||||
foo(1<caret>);
|
||||
foo(1);
|
||||
foo(2);
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
// "Remove parameter 'x'" "true"
|
||||
// DISABLE-ERRORS
|
||||
|
||||
fun foo(y: Int) {
|
||||
foo();
|
||||
foo(y = 1<caret>);
|
||||
foo(2);
|
||||
foo(3);
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
// "Remove parameter 'x'" "true"
|
||||
// DISABLE-ERRORS
|
||||
|
||||
fun f(<caret>y: Int) {
|
||||
f(2);
|
||||
}
|
||||
|
||||
fun g(x: Int, y: Int) {
|
||||
f(y);
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
// "Add parameter to constructor 'Base'" "true"
|
||||
// DISABLE-ERRORS
|
||||
|
||||
open class Base(var x: Int) {
|
||||
val y = Base(1, 2);
|
||||
|
||||
fun f() {
|
||||
val base = Base(1);
|
||||
}
|
||||
}
|
||||
|
||||
open class Inherited(x: Int) : Base(1, <caret>2.5) {}
|
||||
@@ -0,0 +1,9 @@
|
||||
// "Add parameter to function 'foo'" "true"
|
||||
// DISABLE-ERRORS
|
||||
|
||||
fun foo(x: Int) {
|
||||
foo();
|
||||
foo(1);
|
||||
foo(1, 4<caret>);
|
||||
foo(2, 3, sdsd);
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
// "Change the signature of function 'foo'" "true"
|
||||
// DISABLE-ERRORS
|
||||
|
||||
fun foo(x: Int, i: Double) {
|
||||
foo();
|
||||
foo(1);
|
||||
foo(1, 2.5);
|
||||
foo(1.5, 4, <caret>5, 6);
|
||||
foo(2, 3, sdsd);
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
// "Change the signature of function literal" "true"
|
||||
// DISABLE-ERRORS
|
||||
|
||||
fun f(x: Int, y: Int, z : () -> Int) {
|
||||
f(1, 2, {(x: Int, y: Int<caret>) -> x});
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
// "Change the signature of function literal" "true"
|
||||
// DISABLE-ERRORS
|
||||
|
||||
fun f(x: Int, y: Int, z : (Int, Int?, Any) -> Int) {
|
||||
f(1, 2, {(<caret>x: Int) -> x});
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
// "Remove parameter 'x'" "true"
|
||||
// DISABLE-ERRORS
|
||||
|
||||
open class Base(var x: Int) {
|
||||
val y = Base(1);
|
||||
|
||||
fun f() {
|
||||
val base = Base(1, 2);
|
||||
}
|
||||
}
|
||||
|
||||
open class Inherited(x: Int) : Base(<caret>) {}
|
||||
@@ -0,0 +1,9 @@
|
||||
// "Remove parameter 'x'" "true"
|
||||
// DISABLE-ERRORS
|
||||
|
||||
fun foo(x: Int, y: Int) {
|
||||
foo(<caret>);
|
||||
foo(1);
|
||||
foo(1, 2);
|
||||
foo(2, 3, sdsd);
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
// "Remove parameter 'y'" "true"
|
||||
// DISABLE-ERRORS
|
||||
|
||||
fun foo(x: Int, y: Int) {
|
||||
foo(<caret>);
|
||||
foo(1);
|
||||
foo(1, 2);
|
||||
foo(2, 3, sdsd);
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
// "Remove parameter 'y'" "true"
|
||||
// DISABLE-ERRORS
|
||||
|
||||
fun foo(x: Int, y: Int) {
|
||||
foo();
|
||||
foo(1<caret>);
|
||||
foo(1, 2);
|
||||
foo(2, 3, sdsd);
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
// "Remove parameter 'x'" "true"
|
||||
// DISABLE-ERRORS
|
||||
|
||||
fun foo(x: Int, y: Int) {
|
||||
foo();
|
||||
foo(y = 1<caret>);
|
||||
foo(1, 2);
|
||||
foo(2, 3, sdsd);
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
// "Remove parameter 'x'" "true"
|
||||
// DISABLE-ERRORS
|
||||
|
||||
fun f(<caret>x: Int, y: Int) {
|
||||
f(1, 2);
|
||||
}
|
||||
|
||||
fun g(x: Int, y: Int) {
|
||||
f(x, y);
|
||||
}
|
||||
Reference in New Issue
Block a user