C++: Fix bug in findMatchingDefinition.

In strict mode, don't give up after the first Document with candidates.

Change-Id: I62ba59708a3501b31f79d979b1a85bede875eccb
Reviewed-on: http://codereview.qt-project.org/5142
Reviewed-by: Leandro T. C. Melo <leandro.melo@nokia.com>
This commit is contained in:
Christian Kamm
2011-09-19 13:48:28 +02:00
parent cccad7432d
commit 9898a5e094

View File

@@ -844,9 +844,11 @@ Symbol *Snapshot::findMatchingDefinition(Symbol *declaration, bool strict) const
}
}
if (!strict && ! best)
best = viableFunctions.first();
if (strict && ! best)
continue;
if (! best)
best = viableFunctions.first();
return best;
}
}