File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change 10
10
//
11
11
// ===----------------------------------------------------------------------===//
12
12
13
+ #include " swift/IDE/ConformingMethodList.h"
13
14
#include " ExprContextAnalysis.h"
15
+ #include " swift/AST/ASTDemangler.h"
14
16
#include " swift/AST/GenericEnvironment.h"
15
17
#include " swift/AST/NameLookup.h"
16
18
#include " swift/AST/USRGeneration.h"
17
- #include " swift/IDE/ConformingMethodList.h"
18
- #include " swift/IDE/Utils.h"
19
19
#include " swift/Parse/CodeCompletionCallbacks.h"
20
20
#include " swift/Sema/IDETypeChecking.h"
21
21
#include " clang/AST/Attr.h"
@@ -106,9 +106,8 @@ void ConformingMethodListCallbacks::resolveExpectedTypes(
106
106
auto &ctx = CurDeclContext->getASTContext ();
107
107
108
108
for (auto name : names) {
109
- std::string err;
110
- if (auto D = getDeclFromMangledSymbolName (ctx, name, err)) {
111
- if (auto Proto = dyn_cast<ProtocolDecl>(D))
109
+ if (auto ty = Demangle::getTypeForMangling (ctx, name)) {
110
+ if (auto Proto = dyn_cast_or_null<ProtocolDecl>(ty->getAnyGeneric ()))
112
111
result.push_back (Proto);
113
112
}
114
113
}
You can’t perform that action at this time.
0 commit comments