Files
kotlin/compiler/testData/codegen/bytecodeText/conditions/noBoxingForPrimitiveEqObject.kt
2020-02-17 23:52:48 +03:00

29 lines
767 B
Kotlin
Vendored

// IGNORE_BACKEND: JVM_IR
// TODO KT-36646 Don't box primitive values in equality comparison with nullable primitive values in JVM_IR
fun testBoolean1(a: Boolean, b: Any?) = a == b
fun testBoolean2(a: Boolean, b: Any?) = a != b
fun testChar1(a: Char, b: Any?) = a == b
fun testChar2(a: Char, b: Any?) = a != b
fun testByte1(a: Byte, b: Any?) = a == b
fun testByte2(a: Byte, b: Any?) = a != b
fun testShort1(a: Short, b: Any?) = a == b
fun testShort2(a: Short, b: Any?) = a != b
fun testInt1(a: Int, b: Any?) = a == b
fun testInt2(a: Int, b: Any?) = a != b
fun testLong1(a: Long, b: Any?) = a == b
fun testLong2(a: Long, b: Any?) = a != b
// 2 charValue
// 2 byteValue
// 2 shortValue
// 2 intValue
// 2 longValue
// 2 valueOf
// 2 Boolean.valueOf
// 2 areEqual