Commit 25b04ff5 authored by Roberto Raggi's avatar Roberto Raggi
Browse files

Flush the current binding before searching for types.

parent 81d7ac2d
......@@ -448,27 +448,25 @@ ClassOrNamespace *ClassOrNamespace::lookupType_helper(const Name *name,
QSet<ClassOrNamespace *> *processed,
bool searchInEnclosingScope)
{
Q_ASSERT(name != 0);
if (const QualifiedNameId *q = name->asQualifiedNameId()) {
ClassOrNamespace *e = this;
if (! processed->contains(this)) {
processed->insert(this);
if (q->isGlobal())
e = globalNamespace();
if (const QualifiedNameId *q = name->asQualifiedNameId()) {
ClassOrNamespace *e = this;
e = e->lookupType(q->nameAt(0));
if (q->isGlobal())
e = globalNamespace();
for (unsigned index = 1; e && index < q->nameCount(); ++index)
e = e->findType(q->nameAt(index));
e = e->lookupType(q->nameAt(0));
return e;
for (unsigned index = 1; e && index < q->nameCount(); ++index) {
QSet<ClassOrNamespace *> processed;
e = e->lookupType_helper(q->nameAt(index), &processed, /*searchInEnclosingScope =*/ false);
}
} else if (! processed->contains(this)) {
processed->insert(this);
return e;
if (name->isNameId() || name->isTemplateNameId()) {
flush();
} else if (name->isNameId() || name->isTemplateNameId()) {
if (ClassOrNamespace *e = nestedType(name))
return e;
......
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