// ISSUE: KT-53740 // CHECK_TYPE_WITH_EXACT fun test() { val buildee = parallelInOutBuild( { setInProjectedTypeVariable(TargetType()) }, { consumeDifferentType(getOutProjectedTypeVariable()) } ) // 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"), TYPE_MISMATCH("Buildee; Buildee")!>buildee) } class TargetType class DifferentType fun consumeDifferentType(value: DifferentType) {} class Buildee { fun setTypeVariable(value: TV) { storage = value } fun getTypeVariable(): TV = storage private var storage: TV = null!! } class OutBuildee(private val buildee: Buildee) { fun getOutProjectedTypeVariable(): OTV = buildee.getTypeVariable() } class InBuildee(private val buildee: Buildee) { fun setInProjectedTypeVariable(value: ITV) { buildee.setTypeVariable(value) } } fun parallelInOutBuild( inProjectedInstructions: InBuildee.(PTV) -> Unit, outProjectedInstructions: OutBuildee.(PTV) -> Unit ): Buildee { return null!! }