Skip to content

Commit 319d04e

Browse files
committed
Resolve using declarations when looking for types
Signed-off-by: GitHub <[email protected]>
1 parent d54a7fd commit 319d04e

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/parser/cxx/name_lookup.cc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,11 @@ auto Lookup::lookupTypeHelper(Scope* scope, const Identifier* id,
252252
}
253253

254254
for (auto candidate : scope->find(id)) {
255+
if (auto u = symbol_cast<UsingDeclarationSymbol>(candidate);
256+
u && u->target()) {
257+
candidate = u->target();
258+
}
259+
255260
if (is_type(candidate) || candidate->isNamespace()) {
256261
return candidate;
257262
}

0 commit comments

Comments
 (0)