mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
When doing name lookups for diagnostics, use NameLookupFlags::KnownPrivate
unconditionally. Thanks to Jordan for suggesting this.
This commit is contained in:
@@ -3085,9 +3085,8 @@ retry_after_fail:
|
||||
// Ignore accessibility so we get candidates that might have been missed
|
||||
// before.
|
||||
lookupOptions |= NameLookupFlags::IgnoreAccessibility;
|
||||
|
||||
if (isa<AbstractFunctionDecl>(DC))
|
||||
lookupOptions |= NameLookupFlags::KnownPrivate;
|
||||
// This is only used for diagnostics, so always use KnownPrivate.
|
||||
lookupOptions |= NameLookupFlags::KnownPrivate;
|
||||
|
||||
auto lookup = TC.lookupMember(DC, baseObjTy->getCanonicalType(),
|
||||
memberName, lookupOptions);
|
||||
|
||||
Reference in New Issue
Block a user