mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Index optional is pattern
This commit is contained in:
committed by
Robert Widmann
parent
d9d6457177
commit
4d85c8bcd1
@@ -3179,7 +3179,7 @@ namespace {
|
||||
castKind == CheckedCastKind::SetDowncast) {
|
||||
auto toOptType = OptionalType::get(toType);
|
||||
ConditionalCheckedCastExpr *cast = new (ctx) ConditionalCheckedCastExpr(
|
||||
sub, expr->getLoc(), SourceLoc(), TypeLoc::withoutLoc(toType));
|
||||
sub, expr->getLoc(), SourceLoc(), expr->getCastTypeLoc());
|
||||
cs.setType(cast, toOptType);
|
||||
cs.setType(cast->getCastTypeLoc(), toType);
|
||||
if (expr->isImplicit())
|
||||
|
||||
Reference in New Issue
Block a user