mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Reintroduce NameLookupFlags::IgnoreNewExtensions
Soft revert a09382c. It should now be safe to add this flag back as an optimization to specifically disable lazy member loading instead of all extension loading.
Push the flag back everywhere it was needed, but also push it into lookup for associated type members which will never appear in extensions.
This commit is contained in:
@@ -4648,7 +4648,8 @@ ValueDecl *ProtocolDecl::getSingleRequirement(DeclName name) const {
|
||||
}
|
||||
|
||||
AssociatedTypeDecl *ProtocolDecl::getAssociatedType(Identifier name) const {
|
||||
auto results = const_cast<ProtocolDecl *>(this)->lookupDirect(name);
|
||||
const auto flags = NominalTypeDecl::LookupDirectFlags::IgnoreNewExtensions;
|
||||
auto results = const_cast<ProtocolDecl *>(this)->lookupDirect(name, flags);
|
||||
for (auto candidate : results) {
|
||||
if (candidate->getDeclContext() == this &&
|
||||
isa<AssociatedTypeDecl>(candidate)) {
|
||||
|
||||
Reference in New Issue
Block a user