[FIR] Use type without smartcast for local variable with smartcasted initializer

This commit is contained in:
Dmitriy Novozhilov
2021-02-15 12:26:13 +03:00
parent 40e286b354
commit d4c26cca52
24 changed files with 253 additions and 159 deletions
@@ -18,7 +18,7 @@ fun test(x: I1) {
when {
x !is I2 -> return Unit
}
val <destruct>: I2 = x /*as I2 */
val c1: Int = <destruct>.component1()
val c2: String = <destruct>.component2()
val <destruct>: I1 = x /*as I2 */
val c1: Int = <destruct> /*as I2 */.component1()
val c2: String = <destruct> /*as I2 */.component2()
}