Remove Right Part of Binary Expression Quick-Fix: Split to separate quick fixes for cast- and elvis-expressions
This commit is contained in:
+1
-1
@@ -1,4 +1,4 @@
|
||||
// "Remove cast" "true"
|
||||
// "Remove useless cast" "true"
|
||||
fun foo(a: String) {
|
||||
val b = a <caret>as String
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Remove cast" "true"
|
||||
// "Remove useless cast" "true"
|
||||
fun foo(a: String) {
|
||||
val b = a
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Remove cast" "true"
|
||||
// "Remove useless cast" "true"
|
||||
fun test(x: Any): Int {
|
||||
if (x is String) {
|
||||
return (x <caret>as String).length
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Remove cast" "true"
|
||||
// "Remove useless cast" "true"
|
||||
fun test(x: Any): Int {
|
||||
if (x is String) {
|
||||
return x.length
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Remove cast" "true"
|
||||
// "Remove useless cast" "true"
|
||||
fun test(x: Any): String? {
|
||||
if (x is String) {
|
||||
return x <caret>as String
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// "Remove cast" "true"
|
||||
// "Remove useless cast" "true"
|
||||
fun test(x: Any): String? {
|
||||
if (x is String) {
|
||||
return x
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Remove cast" "true"
|
||||
// "Remove useless cast" "true"
|
||||
fun foo(a: Any) {
|
||||
val b = a <caret>as Any
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Remove cast" "true"
|
||||
// "Remove useless cast" "true"
|
||||
fun foo(a: Any) {
|
||||
val b = a<caret>
|
||||
}
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// "Remove elvis operator" "true"
|
||||
// "Remove useless elvis operator" "true"
|
||||
fun foo(a: String) {
|
||||
val b : String = a <caret>?: "s"
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Remove elvis operator" "true"
|
||||
// "Remove useless elvis operator" "true"
|
||||
fun foo(a: String) {
|
||||
val b : String = a<caret>
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user