Refined redundant null check optimization

This commit is contained in:
Denis Zharkov
2014-12-31 16:19:21 +03:00
parent 5675d2b26b
commit 6f94ebb9d6
10 changed files with 139 additions and 5 deletions
@@ -0,0 +1,15 @@
class A
fun box() {
val x: A? = A()
val z: A? = A()
val z1: A? = if (1 == 1) z else x
x!!
z!!
z1!!
}
// 0 IFNULL
// 0 IFNONNULL
// 0 throwNpe
// 0 ATHROW