File tree Expand file tree Collapse file tree 1 file changed +4
-11
lines changed Expand file tree Collapse file tree 1 file changed +4
-11
lines changed Original file line number Diff line number Diff line change @@ -89,17 +89,10 @@ class ContainsSpecializableArchetype : public TypeWalker {
8989
9090 Action walkToTypePre (Type T) override {
9191 if (auto *Archetype = T->getAs <ArchetypeType>()) {
92- if (auto *GenericTypeParam =
93- Archetype->mapTypeOutOfContext ()->getAs <GenericTypeParamType>()) {
94- if (auto GenericTypeParamDecl = GenericTypeParam->getDecl ()) {
95- bool ParamMaybeVisibleInCurrentContext =
96- (DC == GenericTypeParamDecl->getDeclContext () ||
97- DC->isChildContextOf (GenericTypeParamDecl->getDeclContext ()));
98- if (!ParamMaybeVisibleInCurrentContext) {
99- Result = true ;
100- return Action::Stop;
101- }
102- }
92+ if (Archetype->getGenericEnvironment () !=
93+ DC->getGenericEnvironmentOfContext ()) {
94+ Result = true ;
95+ return Action::Stop;
10396 }
10497 }
10598 return Action::Continue;
You can’t perform that action at this time.
0 commit comments