// RUN: %batch-code-completion // rdar://127844278 - Make sure we don't attempt to favor one buildExpression // call over the other when there's a child code completion. protocol P {} protocol Q: P {} struct S: P { private init() {} } extension S where T == () { init(a: Void) {} } extension S: Q where T == String { init(b: String) {} } @resultBuilder struct Builder { static func buildExpression(_ x: T) -> T { x } static func buildExpression(_ x: T) -> T { x } static func buildBlock(_ x: T) -> some P { x } static func buildBlock(_ x: T) -> some P { x } } func foo(@Builder _: () -> T) where T: P {} func foo(@Builder _: () -> T) where T: Q {} foo { S(#^COMPLETE^#) } // COMPLETE-DAG: Decl[Constructor]/CurrNominal/Flair[ArgLabels]/TypeRelation[Convertible]: ['(']{#a: Void#}[')'][#S<()>#]; name=a: // COMPLETE-DAG: Decl[Constructor]/CurrNominal/Flair[ArgLabels]/TypeRelation[Convertible]: ['(']{#b: String#}[')'][#S#]; name=b: