Add quick fixes for SMARTCAST_IMPOSSIBLE in 'if' #KT-27184 Fixed

This commit is contained in:
Toshiaki Kameyama
2018-11-28 06:13:30 +03:00
committed by Mikhail Glukhikh
parent a0162adbf9
commit cf3215b96e
28 changed files with 392 additions and 4 deletions
@@ -0,0 +1,8 @@
// "Replace 'if' expression with elvis expression" "true"
class Test {
var x: Any? = null
fun test() {
val i = if (x is String) <caret>x.length else 0
}
}