File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -3897,12 +3897,6 @@ bool ConstraintSystem::generateConstraints(
3897
3897
SolutionApplicationTarget &target,
3898
3898
FreeTypeVariableBinding allowFreeTypeVariables) {
3899
3899
if (Expr *expr = target.getAsExpr ()) {
3900
- // Try to shrink the system by reducing disjunction domains. This
3901
- // goes through every sub-expression and generate its own sub-system, to
3902
- // try to reduce the domains of those subexpressions.
3903
- shrink (expr);
3904
- target.setExpr (expr);
3905
-
3906
3900
// If the target requires an optional of some type, form a new appropriate
3907
3901
// type variable and update the target's type with an optional of that
3908
3902
// type variable.
Original file line number Diff line number Diff line change @@ -2079,6 +2079,12 @@ TypeChecker::typeCheckExpression(
2079
2079
target.getExprContextualTypeLoc (),
2080
2080
target.getExprContextualTypePurpose ());
2081
2081
2082
+ // Try to shrink the system by reducing disjunction domains. This
2083
+ // goes through every sub-expression and generate its own sub-system, to
2084
+ // try to reduce the domains of those subexpressions.
2085
+ cs.shrink (expr);
2086
+ target.setExpr (expr);
2087
+
2082
2088
// If the client can handle unresolved type variables, leave them in the
2083
2089
// system.
2084
2090
auto allowFreeTypeVariables = FreeTypeVariableBinding::Disallow;
You can’t perform that action at this time.
0 commit comments