From bad5fddec42390af28d428bc009673dd9393bdf2 Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Thu, 3 Mar 2011 14:44:48 +0900 Subject: [PATCH] Fix overloaded function resolution. Update the expression symbol pointer, not just the symbol name. --- tools/qfcc/source/function.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tools/qfcc/source/function.c b/tools/qfcc/source/function.c index 3023f39d9..77fef2481 100644 --- a/tools/qfcc/source/function.c +++ b/tools/qfcc/source/function.c @@ -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; }