Skip to content

Commit d18567a

Browse files
committed
[TypeChecker] Return correct type when asked to skip applying solution
When type-checker is asked to skip applying deduced solution to expression, it still needs to use type information for it to return correct result type.
1 parent 2e5817e commit d18567a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/Sema/TypeCheckConstraints.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1784,7 +1784,7 @@ Type TypeChecker::typeCheckExpression(Expr *&expr, DeclContext *dc,
17841784

17851785
if (options.contains(TypeCheckExprFlags::SkipApplyingSolution)) {
17861786
cleanup.disable();
1787-
return cs.getType(expr);
1787+
return solution.simplifyType(cs.getType(expr));
17881788
}
17891789

17901790
// Apply the solution to the expression.

0 commit comments

Comments
 (0)