Files
kotlin/compiler/testData/codegen/bytecodeText/boxingOptimization/unsafeRemoving.kt
Denis Zharkov 654411a0b0 Refactored tests using Array constructor:
Some moved to tests with stdlib
Some changed to use arrayOfNulls
2014-12-11 16:04:03 +03:00

29 lines
508 B
Kotlin
Vendored

fun returningBoxed() : Int? = 1
fun acceptingBoxed(x : Int?) : Int ? = x
class A(var x : Int? = null)
fun foo() {
val rb = returningBoxed()
acceptingBoxed(2)
val a = A()
a.x = 3
val b = arrayOfNulls<Int>(4)
b[100] = 5
val x = 6 : Int?
val hc = x!!.hashCode()
val y = 7 : Int?
val z = 8 : Int?
val res = y.identityEquals(z)
val c1: Any = if (1 == 1) 0 else "abc"
val c2: Any = if (1 != 1) 0 else "abc"
}
// 9 java/lang/Integer.valueOf
// 0 intValue