Dead code elimination

#KT-6602 Fixed
 #KT-6305 Fixed
 #KT-5656 Fixed
This commit is contained in:
Denis Zharkov
2014-12-30 14:55:45 +03:00
parent aecb925b7b
commit 5675d2b26b
10 changed files with 218 additions and 10 deletions
@@ -0,0 +1,16 @@
fun foo(x: Any?) {}
fun box() {
val x: Int? = 1
x!!
val z: Int? = if (1 == 1) x else null
z!!
foo(1 as java.lang.Integer)
}
// 0 IFNULL
// 1 IFNONNULL
// 1 throwNpe
// 0 ATHROW