Skip to content

Commit c31d7f8

Browse files
author
Harlan Haskins
committed
Rebase on master and resolve conflicts
1 parent 5a6985f commit c31d7f8

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

include/swift/AST/Evaluator.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,6 @@ class Evaluator {
372372
template<
373373
typename Request,
374374
typename std::enable_if<!Request::hasExternalCache>::type * = nullptr>
375-
typename Request::OutputType getResultCached(const Request &request) {
376375
llvm::Expected<typename Request::OutputType>
377376
getResultCached(const Request &request) {
378377
AnyRequest anyRequest{request};

lib/AST/NameLookup.cpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -758,8 +758,9 @@ UnqualifiedLookup::UnqualifiedLookup(DeclName Name, DeclContext *DC,
758758
// "Self" constraints that can affect name lookup.
759759
if (isa<ProtocolDecl>(nominal)) {
760760
if (auto ext = dyn_cast<ExtensionDecl>(dc)) {
761-
for (auto bound :
762-
Ctx.evaluator(SelfBoundsFromWhereClauseRequest{ext}))
761+
auto bounds = evaluateOrDefault(Ctx.evaluator,
762+
SelfBoundsFromWhereClauseRequest{ext}, {});
763+
for (auto bound : bounds)
763764
lookupDecls.push_back(bound);
764765
}
765766
}
@@ -843,8 +844,9 @@ UnqualifiedLookup::UnqualifiedLookup(DeclName Name, DeclContext *DC,
843844
// "Self" constraints that can affect name lookup.
844845
if (isa<ProtocolDecl>(nominal)) {
845846
if (auto ext = dyn_cast<ExtensionDecl>(dc)) {
846-
for (auto bound :
847-
Ctx.evaluator(SelfBoundsFromWhereClauseRequest{ext}))
847+
auto bounds = evaluateOrDefault(Ctx.evaluator,
848+
SelfBoundsFromWhereClauseRequest{ext}, {});
849+
for (auto bound : bounds)
848850
lookupDecls.push_back(bound);
849851
}
850852
}

0 commit comments

Comments
 (0)