Skip to content

Commit 740075d

Browse files
committed
FIXME: Add failing test case (reduced from BorderedButton.swift:1152)
Fixed by adding ``` if (ctx.CompletionContext) { options |= ConstraintSystemFlags::ForCodeCompletion; } ``` in BuilderTransform.cpp:1581 (after `ConstraintSystemOptions options = ConstraintSystemFlags::AllowFixes`)
1 parent 197046c commit 740075d

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

test/IDE/complete_call_arg.swift

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1415,3 +1415,23 @@ func testRdar89773376(arry: [Int]) {
14151415
// RDAR89773376-DAG: Decl[Constructor]/CurrNominal/Flair[ArgLabels]: ['(']{#intVal: Int#}[')'][#Rdar89773376#];
14161416
// RDAR89773376: End completions
14171417
}
1418+
1419+
struct AmbiguousCallInResultBuilder {
1420+
@resultBuilder
1421+
struct MyResultBuilder {
1422+
static func buildBlock(_ value: Int) -> Int {
1423+
return value
1424+
}
1425+
}
1426+
1427+
func ttroke(_ content: Int, style: String) -> Int { 41 }
1428+
func ttroke(_ content: Int, lineWidth: Int = 1) -> Int { 42 }
1429+
1430+
@MyResultBuilder var body: Int {
1431+
self.ttroke(1, #^AMBIGUOUS_IN_RESULT_BUILDER?xfail=TODO^#)
1432+
// AMBIGUOUS_IN_RESULT_BUILDER: Begin completions, 2 items
1433+
// AMBIGUOUS_IN_RESULT_BUILDER-DAG: Pattern/Local/Flair[ArgLabels]: {#style: String#}[#String#];
1434+
// AMBIGUOUS_IN_RESULT_BUILDER-DAG: Pattern/Local/Flair[ArgLabels]: {#lineWidth: Int#}[#Int#];
1435+
// AMBIGUOUS_IN_RESULT_BUILDER: End completions
1436+
}
1437+
}

0 commit comments

Comments
 (0)