Fix over-optimized comparison with null

This commit is contained in:
Alexander Udalov
2013-02-07 16:49:27 +04:00
committed by Alexander Udalov
parent 1670831269
commit 83b93071d3
3 changed files with 20 additions and 2 deletions
@@ -0,0 +1,13 @@
var entered = 0
fun foo<T>(t: T): T {
entered++
return t
}
fun box(): String {
if (foo(null) == null) {}
if (null == foo(null)) {}
if (foo(null) == foo(null)) {}
return if (entered == 4) "OK" else "Fail $entered"
}