Files
kotlin-fork/compiler/testData/codegen/box/inlineClasses/defaultParameterValues/inlineClassSecondaryConstructor.kt
T
2021-10-11 12:09:52 +03:00

13 lines
262 B
Kotlin
Vendored

// WITH_RUNTIME
@Suppress("OPTIONAL_DECLARATION_USAGE_IN_NON_COMMON_SOURCE")
@kotlin.jvm.JvmInline
value class Z(val x: Int) {
constructor(x: Long = 42L) : this(x.toInt())
}
fun box(): String {
if (Z().x != 42) throw AssertionError()
return "OK"
}