File tree Expand file tree Collapse file tree 3 files changed +4
-8
lines changed Expand file tree Collapse file tree 3 files changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -1386,4 +1386,4 @@ void RequirementSignature::getRequirementsWithInverses(
13861386
13871387 reqs.push_back (req);
13881388 }
1389- }
1389+ }
Original file line number Diff line number Diff line change @@ -78,10 +78,8 @@ class ReferencedTypeFinder : public TypeDeclFinder {
7878 // / class-bound ("conforms to" AnyObject).
7979 static bool isConstrained (GenericSignature sig,
8080 GenericTypeParamType *paramTy) {
81- if (sig->getSuperclassBound (paramTy))
82- return true ;
83-
84- return !sig->getRequiredProtocols (paramTy).empty ();
81+ auto existentialTy = sig->getExistentialType (paramTy);
82+ return !(existentialTy->isAny () || existentialTy->isAnyObject ());
8583 }
8684
8785 Action visitBoundGenericType (BoundGenericType *boundGeneric) override {
Original file line number Diff line number Diff line change @@ -77,9 +77,7 @@ static bool isOpenedAnyObject(Type type) {
7777 if (!archetype || !archetype->isRoot ())
7878 return false ;
7979
80- return (archetype->requiresClass () &&
81- archetype->getConformsTo ().empty () &&
82- !archetype->getSuperclass ());
80+ return archetype->getExistentialType ()->isAnyObject ();
8381}
8482
8583SubstitutionMap
You can’t perform that action at this time.
0 commit comments