Handle ctor-initializers in the LookupContext.

This commit is contained in:
Roberto Raggi
2009-09-29 12:46:42 +02:00
parent 0ed9043c34
commit 6b4db9e674
2 changed files with 10 additions and 6 deletions

View File

@@ -276,7 +276,12 @@ QList<Scope *> LookupContext::buildVisibleScopes()
QList<Scope *> scopes;
if (_symbol) {
for (Scope *scope = _symbol->scope(); scope; scope = scope->enclosingScope()) {
Scope *scope = _symbol->scope();
if (Function *fun = _symbol->asFunction())
scope = fun->members(); // handle ctor initializers.
for (; scope; scope = scope->enclosingScope()) {
if (scope == _thisDocument->globalSymbols())
break;