// ISSUE: KT-55057 // CHECK_TYPE_WITH_EXACT // WITH_STDLIB import kotlin.experimental.ExperimentalTypeInference fun Buildee.yieldWithoutAnnotation(value: ETV) {} @OptIn(ExperimentalTypeInference::class) @BuilderInference // note: this annotation was never intended to be used on functions without lambdas fun Buildee.yieldWithAnnotation(t: ETV) {} fun test() { val buildeeA = build { yieldWithoutAnnotation(materializeBuildee()) yieldWithoutAnnotation(materializeBuildee()) } // 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>>(buildeeA) val buildeeB = build { yieldWithAnnotation(materializeBuildee()) yieldWithAnnotation(materializeBuildee()) } // 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>>(buildeeB) } fun materializeBuildee(): Buildee = Buildee() class TargetType class Buildee fun build(instructions: Buildee.() -> Unit): Buildee { return Buildee().apply(instructions) }