mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-08 15:53:19 +00:00
19 lines
343 B
Kotlin
Vendored
19 lines
343 B
Kotlin
Vendored
// !LANGUAGE: +InlineClasses
|
|
// IGNORE_BACKEND: JVM_IR
|
|
// IGNORE_BACKEND: JS_IR
|
|
|
|
inline class Props(val intArray: IntArray) {
|
|
val size get() = intArray.size
|
|
|
|
fun foo(): Int {
|
|
val a = size
|
|
return a
|
|
}
|
|
}
|
|
|
|
fun box(): String {
|
|
val f = Props(intArrayOf(1, 2, 3))
|
|
if (f.foo() != 3) return "fail"
|
|
|
|
return "OK"
|
|
} |