Files
kotlin-fork/compiler/testData/codegen/bytecodeText/inlineClasses/boxThisOfInlineClass.kt
T
2020-11-02 10:50:00 +01:00

29 lines
549 B
Kotlin
Vendored

// !LANGUAGE: +InlineClasses
inline class UInt(val a: Int) {
fun test() {
takeNullable(this) // box
takeAnyInside(this) // box
takeAnyInside(this.a) // box int
}
fun takeAnyInside(a: Any) {}
}
fun takeNullable(a: UInt?) {}
// 1 valueOf
// 0 intValue
// -- 1 before takeNullable
// -- 1 before takeAnyInside
// 2 INVOKESTATIC UInt\.box
// JVM_TEMPLATES:
// -- equals-impl
// 1 INVOKEVIRTUAL UInt\.unbox
// JVM_IR_TEMPLATES:
// -- getA, toString, hashCode, equals-impl, equals
// 5 INVOKEVIRTUAL UInt\.unbox