FIR IDE: Enable tests for ReplaceInfixOrOperatorCallFix.

This commit is contained in:
Mark Punzalan
2021-05-21 21:41:59 +00:00
committed by teamcityserver
parent afeeec3091
commit 5a7f4ffc99
36 changed files with 244 additions and 28 deletions
@@ -1,4 +1,6 @@
// "Replace with safe (?.) call" "true"
operator fun Int.get(row: Int, column: Int) = this
fun foo(arg: Int?) = arg<caret>[42, 13]
fun foo(arg: Int?) = arg<caret>[42, 13]
/* IGNORE_FIR */
@@ -1,4 +1,6 @@
// "Replace with safe (?.) call" "true"
operator fun Int.get(row: Int, column: Int) = this
fun foo(arg: Int?) = arg?.get(42, 13)
fun foo(arg: Int?) = arg?.get(42, 13)
/* IGNORE_FIR */
@@ -1,4 +1,6 @@
// "Replace with safe (?.) call" "true"
fun test(a : Int?) : Int? {
return a <caret>compareTo 6;
}
}
/* IGNORE_FIR */
@@ -1,4 +1,6 @@
// "Replace with safe (?.) call" "true"
fun test(a : Int?) : Int? {
return a?.compareTo(6);
}
}
/* IGNORE_FIR */
@@ -1,3 +1,5 @@
// "Replace with safe (?.) call" "true"
fun foo(exec: (() -> Unit)?) = exec<caret>()
fun foo(exec: (() -> Unit)?) = exec<caret>()
/* IGNORE_FIR */
@@ -1,3 +1,5 @@
// "Replace with safe (?.) call" "true"
fun foo(exec: (() -> Unit)?) = exec?.invoke()
fun foo(exec: (() -> Unit)?) = exec?.invoke()
/* IGNORE_FIR */
@@ -2,3 +2,5 @@
operator fun Int.plus(index: Int) = this
fun fox(arg: Int?) = arg <caret>+ 42
/* IGNORE_FIR */
@@ -2,3 +2,5 @@
operator fun Int.plus(index: Int) = this
fun fox(arg: Int?) = arg?.plus(42)
/* IGNORE_FIR */
@@ -3,4 +3,6 @@
operator fun Int.set(row: Int, column: Int, value: Int) {}
fun foo(arg: Int?) {
arg<caret>[42, 13] = 0
}
}
/* IGNORE_FIR */
@@ -3,4 +3,6 @@
operator fun Int.set(row: Int, column: Int, value: Int) {}
fun foo(arg: Int?) {
arg?.set(42, 13, 0)
}
}
/* IGNORE_FIR */