If then to elvis: now not applicable for is with type unrelated to original #KT-14520 Fixed

This commit is contained in:
Mikhail Glukhikh
2016-10-27 14:56:08 +03:00
parent 87d265dc1b
commit e7cef79709
3 changed files with 23 additions and 1 deletions
@@ -0,0 +1,12 @@
// IS_APPLICABLE: false
interface A
interface B
fun prepare(x: A) = x
fun use(x: A) {}
fun test(x: A) {
val xx = <caret>if (x is B) x else prepare(x)
use(xx)
}