Files
kotlin-fork/compiler/testData/codegen/box/inlineClasses/genericUnderlyingValue/arrayIC.kt
T
Ilmir Usmanov 00a08fc6a4 Minor. Add tests and comment about copying generic parameters to
constructor, but not function reference to the constructor.

 #KT-32162
2022-02-15 08:11:19 +01:00

13 lines
416 B
Kotlin
Vendored

// CHECK_BYTECODE_LISTING
// LANGUAGE: -JvmInlineValueClasses, +GenericInlineClassParameter
// IGNORE_BACKEND: JVM
inline class ICStr(val value: String)
inline class ICIStr<T : ICStr>(val value: T)
inline class ICIStrArray<T : ICStr>(val value: Array<T>)
fun box(): String {
val res = ICIStrArray(arrayOf(ICStr("OK"))).value[0].value
if (res != "OK") return res
return ICIStr(ICStr("OK")).value.value
}