Update box tests to 1.2.0-rc-39

This commit is contained in:
Pavel Punegov
2017-11-09 20:27:53 +03:00
committed by Pavel Punegov
parent 0121b6a185
commit ffa1ffa659
442 changed files with 20811 additions and 165 deletions
@@ -0,0 +1,21 @@
fun foo(p: Int?): Boolean {
return M<Int>(p)?.nulled() == 1
}
fun foo2(p: Int?): Boolean {
return 1 == M<Int>(p)?.nulled()
}
class M<T: Any>(val z: T?) {
fun nulled(): T? = z
}
fun box(): String {
if (foo(null)) return "fail 1"
if (!foo(1)) return "fail 2"
if (foo2(null)) return "fail 1"
if (!foo2(1)) return "fail 2"
return "OK"
}