// ISSUE: KT-52838 // JVM_ABI_K1_K2_DIFF: KT-64738 fun box(): String { build { this as DerivedBuildee<*> getTypeVariable() } return "OK" } open class Buildee { fun getTypeVariable(): TV = storage private var storage: TV = Any() as TV } class DerivedBuildee: Buildee() fun build(instructions: Buildee.() -> Unit): Buildee { return DerivedBuildee().apply(instructions) }