Commit 09bf431a authored by Roberto Raggi's avatar Roberto Raggi
Browse files

Fixed jump to the matching definition.

parent 8ecbb441
......@@ -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())
if (declarations.contains(declaration))
else if (enclosingType == context.lookupType(declarations.first()))
else if (false)
qDebug() << "does not contain" << declaration->fileName() << declaration->line() << declaration->column();
if (viableFunctions.isEmpty())
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