Skip to content

Commit c2bb58d

Browse files
committed
LookupVisibleDecls: Also substitute when the base type is an archetype
1 parent be88c15 commit c2bb58d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/AST/LookupVisibleDecls.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -842,7 +842,8 @@ class OverrideFilteringConsumer : public VisibleDeclConsumer {
842842
// don't substitute either.
843843
bool shouldSubst = (!BaseTy->isAnyObject() &&
844844
!BaseTy->hasTypeVariable() &&
845-
BaseTy->getNominalOrBoundGenericNominal() &&
845+
(BaseTy->getNominalOrBoundGenericNominal() ||
846+
BaseTy->is<ArchetypeType>()) &&
846847
VD->getDeclContext()->isTypeContext());
847848
ModuleDecl *M = DC->getParentModule();
848849

0 commit comments

Comments
 (0)