Files
kotlin-fork/compiler/testData/codegen/box/inlineClasses/kt27705.kt
T
2019-11-19 11:00:09 +03:00

17 lines
325 B
Kotlin
Vendored

// !LANGUAGE: +InlineClasses
// IGNORE_BACKEND_FIR: JVM_IR
// WITH_RUNTIME
inline class Z(val x: Int) {
inner class Inner(val y: Int) {
val xx = x
}
}
fun box(): String {
val zi = Z(42).Inner(100)
if (zi.xx != 42) throw AssertionError()
if (zi.y != 100) throw AssertionError()
return "OK"
}