Quick-Fixes: Drop unnecessary parentheses when simplifying cast expressions
#KT-6501 Fixed
This commit is contained in:
@@ -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
|
||||
}
|
||||
Reference in New Issue
Block a user