If then to elvis: now not applicable for is with nullable type #KT-14545 Fixed

This commit is contained in:
Mikhail Glukhikh
2016-10-27 14:47:18 +03:00
parent 89e908dab5
commit 87d265dc1b
4 changed files with 36 additions and 11 deletions
@@ -0,0 +1,10 @@
// IS_APPLICABLE: false
fun foo(x: CharSequence?) {
val y = if (x is String?) {
x
}
else {
(x as CharSequence).toString()
}<caret>
}