Files
kotlin-fork/compiler/testData/codegen/box/inlineClasses/kt27706.kt
T
2021-12-15 17:14:22 +00:00

19 lines
399 B
Kotlin
Vendored

// WITH_STDLIB
// WORKS_WHEN_VALUE_CLASS
// LANGUAGE: +ValueClasses
OPTIONAL_JVM_INLINE_ANNOTATION
value class Z(val x: Int) {
@Suppress("INNER_CLASS_INSIDE_VALUE_CLASS")
inner class Inner(val z: Z) {
val xx = x
}
}
fun box(): String {
val zi = Z(42).Inner(Z(100))
if (zi.xx != 42) throw AssertionError()
if (zi.z.x != 100) throw AssertionError()
return "OK"
}