// ISSUE: KT-53422 // CHECK_TYPE_WITH_EXACT fun test() { val buildee = buildFromValue( innerBuild { setInnerTypeVariable(TargetType()) }, { it.placeholderExtensionInvokeOnInnerBuildee() } ) // 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) } class TargetType class InnerBuildee { fun setInnerTypeVariable(value: ITV) { storage = value } private var storage: ITV = null!! } fun InnerBuildee.placeholderExtensionInvokeOnInnerBuildee() {} class Buildee fun innerBuild(instructions: InnerBuildee.() -> Unit): InnerBuildee { return InnerBuildee().apply(instructions) } fun buildFromValue(value: PTV, instructions: Buildee.(PTV) -> Unit): Buildee { return Buildee().apply { instructions(value) } }