5e4f022c59
Given inline class V(Any?), a coercion from (Object, V) to (Object, V?) is boxing. In theory, the same issue in the old backend can be fixed by making `KotlinTypeMapper.mapUnderlyingTypeOfInlineClassType` use `computeExpandedTypeForInlineClass`, but for some reason this breaks a lot of stuff. #KT-48430 Fixed
11 lines
205 B
Kotlin
Vendored
11 lines
205 B
Kotlin
Vendored
// IGNORE_BACKEND: JVM
|
|
abstract class C<T> {
|
|
fun foo(v: T?, x: (T) -> Any?) = v?.let { x(it) }
|
|
}
|
|
|
|
inline class V(val value: Any?)
|
|
|
|
class D : C<V>()
|
|
|
|
fun box() = D().foo(V("OK")) { it.value } as String
|