Retain data flow info after array accesses

This commit is contained in:
Alexander Udalov
2012-11-13 15:15:48 +04:00
parent 7c0ea67356
commit 57f18fca2e
7 changed files with 99 additions and 16 deletions
@@ -0,0 +1,26 @@
trait G {
fun get(x: Int, y: Int): Int = x + y
fun set(x: Int, y: Int, value: Int) {}
}
fun foo1(a: Int?, b: G) {
b[a!!, a<!UNNECESSARY_NOT_NULL_ASSERTION!>!!<!>] = a
a : Int
}
fun foo2(a: Int?, b: G) {
b[0, a!!] = a
a : Int
}
fun foo3(a: Int?, b: G) {
val r = b[a!!, a]
a : Int
r : Int
}
fun foo4(a: Int?, b: G) {
val r = b[0, a!!]
a : Int
r : Int
}