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(
1386
1386
1387
1387
reqs.push_back (req);
1388
1388
}
1389
- }
1389
+ }
Original file line number Diff line number Diff line change @@ -78,10 +78,8 @@ class ReferencedTypeFinder : public TypeDeclFinder {
78
78
// / class-bound ("conforms to" AnyObject).
79
79
static bool isConstrained (GenericSignature sig,
80
80
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 ());
85
83
}
86
84
87
85
Action visitBoundGenericType (BoundGenericType *boundGeneric) override {
Original file line number Diff line number Diff line change @@ -77,9 +77,7 @@ static bool isOpenedAnyObject(Type type) {
77
77
if (!archetype || !archetype->isRoot ())
78
78
return false ;
79
79
80
- return (archetype->requiresClass () &&
81
- archetype->getConformsTo ().empty () &&
82
- !archetype->getSuperclass ());
80
+ return archetype->getExistentialType ()->isAnyObject ();
83
81
}
84
82
85
83
SubstitutionMap
You can’t perform that action at this time.
0 commit comments