Cast unary intrinsics to expected type

This commit is contained in:
Natalia Ukhorskaya
2013-12-16 14:04:18 +04:00
parent 20aa3409c7
commit 4ef1af7d12
3 changed files with 16 additions and 1 deletions
@@ -0,0 +1,8 @@
fun box(): String {
if (!foo(1.toByte())) return "fail 1"
if (!foo(-1.toByte())) return "fail 2"
return "OK"
}
fun foo(p: Any) = p is Byte