mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[ConstraintSystem] Use new condition element in constraint generation/diagnostics
This commit is contained in:
@@ -2578,10 +2578,10 @@ namespace {
|
||||
if (!boolDecl)
|
||||
return Type();
|
||||
|
||||
CS.addConstraint(ConstraintKind::Conversion,
|
||||
CS.getType(expr->getCondExpr()),
|
||||
boolDecl->getDeclaredType(),
|
||||
CS.getConstraintLocator(expr->getCondExpr()));
|
||||
CS.addConstraint(
|
||||
ConstraintKind::Conversion, CS.getType(expr->getCondExpr()),
|
||||
boolDecl->getDeclaredType(),
|
||||
CS.getConstraintLocator(expr, LocatorPathElt::Condition()));
|
||||
|
||||
// The branches must be convertible to a common type.
|
||||
return CS.addJoinConstraint(CS.getConstraintLocator(expr),
|
||||
|
||||
Reference in New Issue
Block a user