Skip to content

Commit 2adff51

Browse files
author
Enrico Granata
authored
Merge pull request #5133 from egranata/find-funcs-in-ext
Allow demangling of methods in extensions
2 parents d5642f7 + 532d106 commit 2adff51

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/IDE/TypeReconstruction.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,10 @@ class DeclsLookupSource {
243243
}
244244
} else if (_type == LookupKind::SwiftModule)
245245
_module->lookupValue(path, name, kind, result);
246+
else if (_type == LookupKind::Extension) {
247+
auto results = _extension._decl->lookupDirect(DeclName(name));
248+
result.append(results.begin(), results.end());
249+
}
246250
return;
247251
}
248252

@@ -1322,6 +1326,7 @@ static void VisitNodeFunction(
13221326
case Demangle::Node::Kind::Module:
13231327
case Demangle::Node::Kind::Structure:
13241328
case Demangle::Node::Kind::Protocol:
1329+
case Demangle::Node::Kind::Extension:
13251330
nodes.push_back((*pos));
13261331
VisitNode(ast, nodes, decl_scope_result, generic_context);
13271332
break;

0 commit comments

Comments
 (0)