mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-09 15:53:37 +00:00
21 lines
374 B
Kotlin
Vendored
21 lines
374 B
Kotlin
Vendored
// !LANGUAGE: +InlineClasses
|
|
// IGNORE_BACKEND: JVM_IR
|
|
|
|
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?) {}
|
|
|
|
// 2 INVOKESTATIC UInt\.box
|
|
// 0 INVOKEVIRTUAL Foo.unbox
|
|
|
|
// 1 valueOf
|
|
// 0 intValue |