File tree Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -1101,6 +1101,9 @@ Optional<BraceStmt *> TypeChecker::applyFunctionBuilderBodyTransform(
1101
1101
// The system was salvaged; continue on as if nothing happened.
1102
1102
}
1103
1103
1104
+ // FIXME: Shouldn't need to do this.
1105
+ cs.applySolution (solutions.front ());
1106
+
1104
1107
// Apply the solution to the function body.
1105
1108
if (auto result = cs.applySolution (
1106
1109
solutions.front (),
Original file line number Diff line number Diff line change @@ -327,3 +327,17 @@ func checkImplicitSelfInClosure() {
327
327
}
328
328
}
329
329
}
330
+
331
+ // rdar://problem/59239224 - crash because some nodes don't have type
332
+ // information during solution application.
333
+ struct X < T> {
334
+ init ( _: T ) { }
335
+ }
336
+
337
+ @TupleBuilder func foo( cond: Bool ) -> some Any {
338
+ if cond {
339
+ tuplify ( cond) { x in
340
+ X ( x)
341
+ }
342
+ }
343
+ }
You can’t perform that action at this time.
0 commit comments