[qfcc] Use maximum cost for non-matching param counts

I had missed this so such cases wound up with a cost of 0 resulting in
bogusly ambiguous function calls (or possibly worse).
This commit is contained in:
Bill Currie 2025-01-14 01:11:19 +09:00
parent 17ae2b592c
commit 9ba335f91e

View file

@ -677,6 +677,7 @@ find_generic_function (genfunc_t **genfuncs, const expr_t *fexpr,
for (int j = 0; j < num_funcs; j++) {
auto g = genfuncs[j];
if (g->num_params != num_params) {
costs[j] = ~0u;
continue;
}
const type_t *types[g->num_types] = {};