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

13 lines
342 B
Kotlin
Vendored

// WITH_STDLIB
// KT-41771
// WORKS_WHEN_VALUE_CLASS
// LANGUAGE: +ValueClasses
OPTIONAL_JVM_INLINE_ANNOTATION
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]
}