File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -2512,7 +2512,7 @@ namespace {
2512
2512
expr->getCastTypeLoc ().setType (toType, /* validated=*/ true );
2513
2513
2514
2514
auto fromType = CS.getType (fromExpr);
2515
- auto locator = CS.getConstraintLocator (fromExpr );
2515
+ auto locator = CS.getConstraintLocator (expr );
2516
2516
2517
2517
// The source type can be checked-cast to the destination type.
2518
2518
CS.addConstraint (ConstraintKind::CheckedCast, fromType, toType, locator);
@@ -2560,7 +2560,7 @@ namespace {
2560
2560
expr->getCastTypeLoc ().setType (toType, /* validated=*/ true );
2561
2561
2562
2562
auto fromType = CS.getType (fromExpr);
2563
- auto locator = CS.getConstraintLocator (fromExpr );
2563
+ auto locator = CS.getConstraintLocator (expr );
2564
2564
CS.addConstraint (ConstraintKind::CheckedCast, fromType, toType, locator);
2565
2565
return OptionalType::get (toType);
2566
2566
}
You can’t perform that action at this time.
0 commit comments