FIR IDE: Remove multiple nested params in RemoveUselessElvisFix and
RemoveUselessCastFix.
This commit is contained in:
committed by
TeamCityServer
parent
a778cc673e
commit
d12a24418e
+9
@@ -0,0 +1,9 @@
|
||||
// "Remove useless cast" "true"
|
||||
fun foo() {}
|
||||
|
||||
fun test() {
|
||||
foo()
|
||||
// comment
|
||||
((({ "" } as<caret> () -> String)))
|
||||
}
|
||||
/* IGNORE_FIR */
|
||||
Vendored
+9
@@ -0,0 +1,9 @@
|
||||
// "Remove useless cast" "true"
|
||||
fun foo() {}
|
||||
|
||||
fun test() {
|
||||
foo()
|
||||
// comment
|
||||
({ "" })
|
||||
}
|
||||
/* IGNORE_FIR */
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
// "Remove useless cast" "true"
|
||||
fun test() {
|
||||
((({ "" } as<caret> () -> String)))
|
||||
}
|
||||
/* IGNORE_FIR */
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
// "Remove useless cast" "true"
|
||||
fun test() {
|
||||
{ "" }
|
||||
}
|
||||
/* IGNORE_FIR */
|
||||
@@ -0,0 +1,9 @@
|
||||
// "Remove useless cast" "true"
|
||||
fun test(x: Any): Int {
|
||||
if (x is String) {
|
||||
return (((x <caret>as String))).length
|
||||
}
|
||||
return -1
|
||||
}
|
||||
|
||||
/* IGNORE_FIR */
|
||||
@@ -0,0 +1,9 @@
|
||||
// "Remove useless cast" "true"
|
||||
fun test(x: Any): Int {
|
||||
if (x is String) {
|
||||
return x.length
|
||||
}
|
||||
return -1
|
||||
}
|
||||
|
||||
/* IGNORE_FIR */
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
// "Remove useless elvis operator" "true"
|
||||
fun foo() {}
|
||||
|
||||
fun test() {
|
||||
foo()
|
||||
// comment
|
||||
((({ "" } <caret>?: null)))
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
// "Remove useless elvis operator" "true"
|
||||
fun foo() {}
|
||||
|
||||
fun test() {
|
||||
foo()
|
||||
// comment
|
||||
({ "" })
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
// "Remove useless elvis operator" "true"
|
||||
fun test() {
|
||||
((({ "" } <caret>?: null)))
|
||||
}
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
// "Remove useless elvis operator" "true"
|
||||
fun test() {
|
||||
{ "" }
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
// "Remove useless elvis operator" "true"
|
||||
fun foo(a: String) {
|
||||
val b : String = (((a <caret>?: "s")))
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
// "Remove useless elvis operator" "true"
|
||||
fun foo(a: String) {
|
||||
val b : String = a<caret>
|
||||
}
|
||||
Reference in New Issue
Block a user