Files
kotlin-fork/compiler/testData/codegen/box/inlineClasses/nonImmediateInlineClassUpperBound.kt
T
vladislav.grechko 8f2825506a Don't do full type parameters erasure in PromisedValue::materializeAt
The only case when erasure matters in a context of materialization of
`PromisedValue` is when the type is a type parameter which upper bound
is an inline class. Since `PromisedValue::materializeAt` is a hot spot
and `eraseTypeParameters` is an expensive operation, we should not do
type erasure in other cases.
2023-08-29 18:46:53 +00:00

10 lines
152 B
Kotlin
Vendored

// TARGET_BACKEND: JVM_IR
// WITH_STDLIB
@JvmInline
value class Z(val value: String)
fun <T : U, U : Z> foo(t: T) = t.value
fun box() = foo(Z("OK"))