Skip to content

Commit dadcea6

Browse files
committed
comment amendment
1 parent ee4587f commit dadcea6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/AST/LookupVisibleDecls.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -877,8 +877,8 @@ void swift::lookupVisibleDecls(VisibleDeclConsumer &Consumer,
877877
LS = LS.withOnMetatype();
878878
}
879879

880-
// Look for generic parameters in the current context. Those in parent
881-
// contexts will be looked up anyways via `lookupVisibleMemberDecls`.
880+
// We don't look for generic parameters if we are in the context of a
881+
// nominal type: they will be looked up anyways via `lookupVisibleMemberDecls`.
882882
if (DC && !isa<NominalTypeDecl>(DC)) {
883883
if (auto *decl = DC->getAsDeclOrDeclExtensionContext()) {
884884
if (auto GC = decl->getAsGenericContext()) {

0 commit comments

Comments
 (0)