Files
kotlin-fork/compiler/testData/codegen/box/inlineClasses/kt26103_original.kt
T
Mark Punzalan 802beb49a6 Use TypeSubstitutor to get the substituted underlying type for inline
classes, instead of MemberScope.

The primary motivation was to fix issues around type-mapping for inline
classes in FIR, which uses wrapped descriptors that have empty
MemberScopes.
2020-06-04 17:03:55 +03:00

12 lines
205 B
Kotlin
Vendored

// !LANGUAGE: +InlineClasses
// WITH_RUNTIME
inline class Foo<T>(val x: Int)
class Bar(val y: Foo<Any>)
fun box(): String {
if (Bar(Foo<Any>(42)).y.x != 42) throw AssertionError()
return "OK"
}