// ISSUE: KT-52838 // CHECK_TYPE_WITH_EXACT fun test() { val buildee = build { this as DerivedBuildee<*, *> getTypeVariableA() getTypeVariableB() } // 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 getTypeVariableA(): TVA = storageA fun getTypeVariableB(): TVB = storageB private var storageA: TVA = null!! private var storageB: TVB = null!! } class DerivedBuildee: Buildee() fun build(instructions: Buildee.() -> Unit): Buildee { return DerivedBuildee().apply(instructions) }