@@ -73,8 +73,9 @@ class SolutionApplicationTarget;
7373// so they could be made friends of ConstraintSystem.
7474namespace TypeChecker {
7575
76- Optional<BraceStmt *> applyResultBuilderBodyTransform (FuncDecl *func,
77- Type builderType);
76+ Optional<BraceStmt *> applyResultBuilderBodyTransform (
77+ FuncDecl *func, Type builderType,
78+ bool ClosuresInResultBuilderDontParticipateInInference);
7879
7980Optional<constraints::SolutionApplicationTarget>
8081typeCheckExpression (constraints::SolutionApplicationTarget &target,
@@ -1801,6 +1802,12 @@ enum class ConstraintSystemFlags {
18011802
18021803 // / Disable macro expansions.
18031804 DisableMacroExpansions = 0x100 ,
1805+
1806+ // / Non solver-based code completion expects that closures inside result
1807+ // / builders don't participate in inference.
1808+ // / Once all code completion kinds are migrated to solver-based we should be
1809+ // / able to remove this flag.
1810+ ClosuresInResultBuildersDontParticipateInInference = 0x200 ,
18041811};
18051812
18061813// / Options that affect the constraint system as a whole.
@@ -3609,8 +3616,9 @@ class ConstraintSystem {
36093616
36103617 // FIXME: Perhaps these belong on ConstraintSystem itself.
36113618 friend Optional<BraceStmt *>
3612- swift::TypeChecker::applyResultBuilderBodyTransform (FuncDecl *func,
3613- Type builderType);
3619+ swift::TypeChecker::applyResultBuilderBodyTransform (
3620+ FuncDecl *func, Type builderType,
3621+ bool ClosuresInResultBuilderDontParticipateInInference);
36143622
36153623 friend Optional<SolutionApplicationTarget>
36163624 swift::TypeChecker::typeCheckExpression (
0 commit comments