Commit 249aaa0a authored by Roberto Raggi's avatar Roberto Raggi
Browse files

Fixed the lookup of qualified name ids.

parent 53acec0d
......@@ -176,7 +176,7 @@ QList<Symbol *> LookupContext::resolve(Name *name, const QList<Scope *> &visible
scopes.clear();
foreach (Symbol *candidate, candidates) {
if (ScopedSymbol *scoped = candidate->asScopedSymbol()) {
scopes.append(scoped->members());
expand(scoped->members(), visibleScopes, &scopes);
}
}
}
......@@ -223,9 +223,14 @@ QList<Symbol *> LookupContext::resolve(Name *name, const QList<Scope *> &visible
continue;
if (q->nameCount() > 1) {
Name *classOrNamespaceName =
control()->qualifiedNameId(q->names(),
q->nameCount() - 1);
Name *classOrNamespaceName = 0;
if (q->nameCount() == 1)
classOrNamespaceName = q->nameAt(0);
else
classOrNamespaceName = control()->qualifiedNameId(q->names(),
q->nameCount() - 1);
const QList<Symbol *> resolvedClassOrNamespace =
resolveClassOrNamespace(classOrNamespaceName, visibleScopes);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment