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

12 lines
342 B
Kotlin
Vendored

// WITH_RUNTIME
// KT-41771
@Suppress("OPTIONAL_DECLARATION_USAGE_IN_NON_COMMON_SOURCE")
@kotlin.jvm.JvmInline
value class Polynomial<T : Any>(val coefficients: List<T>) {
constructor(vararg coefficients: T) : this(coefficients.toList())
}
fun box(): String {
val p = Polynomial("FAIL1", "OK", "FAIL2")
return p.coefficients[1]
}