-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[Name lookup] Use decl-based name lookup for protocol-related queries #18530
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
971a6e3
6556926
b947a47
a8cc606
1610a89
7d3dd49
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -592,10 +592,6 @@ ModuleDecl::lookupConformance(Type type, ProtocolDecl *protocol) { | |
// existential's list of conformances and the existential conforms to | ||
// itself. | ||
if (type->isExistentialType()) { | ||
// FIXME: Recursion break. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Are you sure this is not needed? existentialConformsToSelf() can call back into validateDecl() IIRC There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No longer! It uses simpler queries that don't go through |
||
if (!protocol->hasValidSignature()) | ||
return None; | ||
|
||
// If the existential type cannot be represented or the protocol does not | ||
// conform to itself, there's no point in looking further. | ||
if (!protocol->existentialConformsToSelf()) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ProtocolDecl::createGenericParamsIfMissing() is lighter weight
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed, thank you!