// ISSUE: KT-52838 // CHECK_TYPE_WITH_EXACT fun test() { val buildee = build { this as DerivedBuildee<*> getTypeVariable() getTypeVariable() } // exact type equality check — turns unexpected compile-time behavior into red code // considered to be non-user-reproducible code for the purposes of these tests checkExactType>(; Buildee<*>")!>buildee) } open class Buildee { fun getTypeVariable(): TV = storage private var storage: TV = null!! } class DerivedBuildee: Buildee() fun build(instructions: Buildee.() -> Unit): Buildee { return DerivedBuildee().apply(instructions) }