Correct processing of "is" check

This commit is contained in:
Valentin Kipyatkov
2016-08-25 20:11:42 +03:00
parent 25ab66053b
commit 3910f31de9
3 changed files with 31 additions and 8 deletions
@@ -24,6 +24,7 @@ fun listOfA() = listOf<A>(A(1, "", ""))
fun x(o: Any) {
if (o is A) {
val (x, y) = o
val (x1, y1) = A(1, "", "")
}
}
@@ -6,7 +6,8 @@
[dataClass.2.kt] Value read 13 val (x4, y4, z4) = listOfA()[0]
[dataClass.2.kt] Value read 15 val (x5, y5, z5) = javaClass.getA()[0]
[dataClass.2.kt] Value read 26 val (x, y) = o
[dataClass.2.kt] Value read 32 val (x, y) = list[0]
[dataClass.2.kt] Value read 27 val (x1, y1) = A(1, "", "")
[dataClass.2.kt] Value read 33 val (x, y) = list[0]
[dataClass.2.kt] Value read 5 a.n
[dataClass.2.kt] Value read 8 val (x, y, z) = a
[dataClass.2.kt] Value read 9 val (x1, y1, z1) = f()