Make unary minus and unary plus return int for byte and short
This commit is contained in:
@@ -6,8 +6,8 @@ fun box(): String {
|
||||
val a5: Double? = 1.0.minus()
|
||||
val a6: Float? = 1f.minus()
|
||||
|
||||
if (a1!! != -1.toByte()) return "fail 1"
|
||||
if (a2!! != -1.toShort()) return "fail 2"
|
||||
if (a1!! != (-1).toByte()) return "fail 1"
|
||||
if (a2!! != (-1).toShort()) return "fail 2"
|
||||
if (a3!! != -1) return "fail 3"
|
||||
if (a4!! != -1L) return "fail 4"
|
||||
if (a5!! != -1.0) return "fail 5"
|
||||
|
||||
Reference in New Issue
Block a user