Quick-Fixes: Drop unnecessary parentheses when simplifying cast expressions

#KT-6501 Fixed
This commit is contained in:
Alexey Sedunov
2015-03-13 20:54:05 +03:00
parent 71a5e09a0b
commit a2162810ff
4 changed files with 32 additions and 8 deletions
@@ -0,0 +1,7 @@
// "Remove cast" "true"
fun test(x: Any): Int {
if (x is String) {
return x.length()
}
return -1
}
@@ -0,0 +1,7 @@
// "Remove cast" "true"
fun test(x: Any): Int {
if (x is String) {
return (x <caret>as String).length()
}
return -1
}