Merge pull request #40708 from xedin/disable-multi-stmt-inference-inside-result-builder-bodies

[ConstraintSystem] SE-0326: Temporarily prevent multi-statement closure inference in result builder contexts
This commit is contained in:
Pavel Yaskevich
2022-01-06 01:04:22 -08:00
committed by GitHub
5 changed files with 144 additions and 36 deletions

View File

@@ -5292,6 +5292,10 @@ public:
/// part of the constraint system.
void forEachExpr(Expr *expr, llvm::function_ref<Expr *(Expr *)> callback);
/// Determine whether one of the parent closures the given one is nested
/// in (if any) has a result builder applied to its body.
bool isInResultBuilderContext(ClosureExpr *closure) const;
SWIFT_DEBUG_DUMP;
SWIFT_DEBUG_DUMPER(dump(Expr *));