Fix overloaded function resolution.

Update the expression symbol pointer, not just the symbol name.
This commit is contained in:
Bill Currie 2011-03-03 14:44:48 +09:00
parent fff4fc693e
commit bad5fddec4

View file

@ -397,8 +397,13 @@ find_function (expr_t *fexpr, expr_t *params)
if (reported)
return fexpr;
if (best) {
if (best->overloaded)
fexpr->e.symbol->name = best->full_name;
if (best->overloaded) {
fexpr->e.symbol = symtab_lookup (current_symtab,
best->full_name);
if (!fexpr->e.symbol)
internal_error (fexpr, "overloaded function %s not found",
best->full_name);
}
free (funcs);
return fexpr;
}