Commit 70bdb372 authored by Roberto Raggi's avatar Roberto Raggi
Browse files

Resolve fully qualified names.

parent a67e1394
......@@ -152,6 +152,25 @@ ClassBinding *NamespaceBinding::findClassBinding(Name *name, QSet<Binding *> *pr
if (processed->contains(this))
return 0;
if (const QualifiedNameId *q = name->asQualifiedNameId()) {
Binding *current = this;
for (unsigned i = 0; i < q->nameCount(); ++i) {
Identifier *nameId = q->nameAt(i)->identifier();
if (! nameId)
return 0;
QSet<Binding *> visited;
Binding *binding = current->findClassOrNamespaceBinding(nameId, &visited); // ### TODO: check recursion.
if (! binding)
return 0;
current = binding;
}
return current->asClassBinding();
}
processed->insert(this);
Identifier *id = name->identifier();
......
Markdown is supported
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