We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Optional<T>
1 parent 439cbaf commit 6add8f2Copy full SHA for 6add8f2
lib/Sema/CSSimplify.cpp
@@ -6268,9 +6268,9 @@ ConstraintSystem::SolutionKind ConstraintSystem::simplifyTransitivelyConformsTo(
6268
6269
SmallVector<Type, 4> typesToCheck;
6270
6271
- // Optional<T>
6272
- typesToCheck.push_back(
6273
- OptionalType::get(resolvedTy->getWithoutSpecifierType()));
+ // T -> Optional<T>
+ if (!resolvedTy->getOptionalObjectType())
+ typesToCheck.push_back(OptionalType::get(resolvedTy));
6274
6275
// AnyHashable
6276
if (auto *anyHashable = ctx.getAnyHashableDecl())
0 commit comments