Skip to content
Snippets Groups Projects
Commit 09bf431a authored by Roberto Raggi's avatar Roberto Raggi
Browse files

Fixed jump to the matching definition.

parent 8ecbb441
No related branches found
No related tags found
No related merge requests found
......@@ -742,14 +742,17 @@ Symbol *Snapshot::findMatchingDefinition(Symbol *symbol) const
QList<Function *> viableFunctions;
ClassOrNamespace *enclosingType = context.lookupType(declaration);
if (! enclosingType)
continue; // nothing to do
foreach (Function *fun, result) {
const QList<Symbol *> declarations = context.lookup(fun->name(), fun->scope());
if (declarations.isEmpty())
continue;
if (declarations.contains(declaration))
else if (enclosingType == context.lookupType(declarations.first()))
viableFunctions.append(fun);
else if (false)
qDebug() << "does not contain" << declaration->fileName() << declaration->line() << declaration->column();
}
if (viableFunctions.isEmpty())
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment