mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Only report dynamic lookup methods once.
Previously we reported them once for their base name and once for their full name, which is unnecessary. All clients were already de-duping, though. Swift SVN r24051
This commit is contained in:
@@ -268,6 +268,11 @@ void SourceLookupCache::lookupClassMembers(AccessPathTy accessPath,
|
||||
|
||||
if (!accessPath.empty()) {
|
||||
for (auto &member : ClassMembers) {
|
||||
// Non-simple names are also stored under their simple name, so make
|
||||
// sure to only report them once.
|
||||
if (!member.first.isSimpleName())
|
||||
continue;
|
||||
|
||||
for (ValueDecl *vd : member.second) {
|
||||
Type ty = vd->getDeclContext()->getDeclaredTypeOfContext();
|
||||
if (auto nominal = ty->getAnyNominal())
|
||||
@@ -279,6 +284,11 @@ void SourceLookupCache::lookupClassMembers(AccessPathTy accessPath,
|
||||
}
|
||||
|
||||
for (auto &member : ClassMembers) {
|
||||
// Non-simple names are also stored under their simple name, so make sure to
|
||||
// only report them once.
|
||||
if (!member.first.isSimpleName())
|
||||
continue;
|
||||
|
||||
for (ValueDecl *vd : member.second)
|
||||
consumer.foundDecl(vd, DeclVisibilityKind::DynamicLookup);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user