Fix over-optimized comparison with null
This commit is contained in:
committed by
Alexander Udalov
parent
1670831269
commit
83b93071d3
@@ -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"
|
||||
}
|
||||
Reference in New Issue
Block a user