Get rid of redundant boxing of unsigned operands of infix 'compareTo'
^KT-48759: Fixed
This commit is contained in:
committed by
teamcity
parent
7423b35741
commit
cb93e9d408
@@ -0,0 +1,16 @@
|
||||
// WITH_STDLIB
|
||||
// TARGET_BACKEND: JVM_IR
|
||||
|
||||
fun compareUInts(a: UInt, b: UInt) = a compareTo b
|
||||
fun compareULongs(a: ULong, b: ULong) = a compareTo b
|
||||
|
||||
|
||||
fun box(): String {
|
||||
if (compareUInts(0u, 1u) != -1) return "Fail 1"
|
||||
if (compareULongs(0u, 1u) != -1) return "Fail 2"
|
||||
return "OK"
|
||||
}
|
||||
|
||||
// CHECK_BYTECODE_TEXT
|
||||
// 0 INVOKESTATIC kotlin/ULong.box-impl
|
||||
// 0 INVOKESTATIC kotlin/UInt.box-impl
|
||||
Reference in New Issue
Block a user