// ISSUE: KT-63733 // CHECK_TYPE_WITH_EXACT fun BoundedBuildee.setBoundedTypeVariable(arg: DifferentType) {} fun test() { boundedBuild { setBoundedTypeVariable(TargetType()) setBoundedTypeVariable(DifferentType()) } val buildee = boundedBuild { setBoundedTypeVariable(TargetType()) setBoundedTypeVariable(DifferentType()) } // 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>(; BoundedBuildee"), TYPE_MISMATCH("BoundedBuildee; BoundedBuildee")!>buildee) } open class TargetTypeBase class TargetType: TargetTypeBase() class DifferentType class BoundedBuildee { fun setBoundedTypeVariable(value: BTV) { storage = value } private var storage: BTV = null!! } fun boundedBuild(instructions: BoundedBuildee.() -> Unit): BoundedBuildee { return BoundedBuildee().apply(instructions) }