Skip to content

Commit 9ab18f6

Browse files
committed
LookupVisibleDecls: Also substitute when the base type is an archetype
1 parent e563296 commit 9ab18f6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/Sema/LookupVisibleDecls.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -837,7 +837,8 @@ class OverrideFilteringConsumer : public VisibleDeclConsumer {
837837
// don't substitute either.
838838
bool shouldSubst = (!BaseTy->isAnyObject() &&
839839
!BaseTy->hasTypeVariable() &&
840-
BaseTy->getNominalOrBoundGenericNominal() &&
840+
(BaseTy->getNominalOrBoundGenericNominal() ||
841+
BaseTy->is<ArchetypeType>()) &&
841842
VD->getDeclContext()->isTypeContext());
842843
ModuleDecl *M = DC->getParentModule();
843844

0 commit comments

Comments
 (0)