Make unary minus and unary plus return int for byte and short

This commit is contained in:
Natalia Ukhorskaya
2013-12-19 17:42:28 +04:00
parent 802c1b772f
commit 4329c42e3f
23 changed files with 76 additions and 68 deletions
@@ -1,7 +1,7 @@
data class A(val a: Byte)
fun box() : String {
val v1 = A(-10.toByte()).hashCode()
val v2 = (-10.toByte() as Byte?)!!.hashCode()
val v1 = A(10.toByte()).hashCode()
val v2 = (10.toByte() as Byte?)!!.hashCode()
return if( v1 == v2 ) "OK" else "$v1 $v2"
}