Quick-Fixes: Support USELESS_CAST diagnostic in "Remove cast" quick-fix

#KT-6422 Fixed
This commit is contained in:
Alexey Sedunov
2015-03-13 20:17:56 +03:00
parent f5107be315
commit 71a5e09a0b
12 changed files with 47 additions and 12 deletions
@@ -0,0 +1,4 @@
// "Remove cast" "true"
fun foo(a: String) {
val b = a
}
@@ -0,0 +1,7 @@
// "Remove cast" "true"
fun test(x: Any): String? {
if (x is String) {
return x
}
return null
}
@@ -0,0 +1,4 @@
// "Remove cast" "true"
fun foo(a: String) {
val b = a <caret>as Any
}
@@ -0,0 +1,7 @@
// "Remove cast" "true"
fun test(x: Any): String? {
if (x is String) {
return x <caret>as String
}
return null
}