Files
kotlin-fork/compiler/testData/codegen/box/inlineClasses/genericUnderlyingValue/recursive.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

14 lines
419 B
Kotlin
Vendored

// LANGUAGE: -JvmInlineValueClasses, +GenericInlineClassParameter
// IGNORE_BACKED: JVM
inline class ICAny<T>(val value: T)
fun box(): String {
var res = ICAny("OK").value
if (res != "OK") return "FAIL 1: $res"
res = ICAny(ICAny("OK")).value.value
if (res != "OK") return "FAIL 2: $res"
res = ICAny(ICAny(ICAny("OK"))).value.value.value
if (res != "OK") return "FAIL 3: $res"
return "OK"
}