From 80a9aaf9d6fb202f3bc63deaec186401ff080ba0 Mon Sep 17 00:00:00 2001 From: martinw Date: Wed, 14 Jun 2000 10:38:03 +0000 Subject: bugfix: the compiler was unable to deal with macros that called a local function that had the same name as the macro: ////////// module t5 import t6 Start = f f ///////// definition module t6 f x :== f x where f x = x ///////// caused an abort git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@162 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d --- frontend/transform.icl | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'frontend') diff --git a/frontend/transform.icl b/frontend/transform.icl index 485e464..539e0ac 100644 --- a/frontend/transform.icl +++ b/frontend/transform.icl @@ -721,10 +721,15 @@ where removeFunctionCallsFromSymbolTable calls fun_defs symbol_table = foldSt remove_function_call_from_symbol_table calls (fun_defs, symbol_table) where + remove_function_call_from_symbol_table {fc_index} (fun_defs, symbol_table) # ({fun_symb = { id_info }}, fun_defs) = fun_defs![fc_index] - # (entry, symbol_table) = readPtr id_info symbol_table - = (fun_defs, symbol_table <:= (id_info, entry.ste_previous)) + (entry, symbol_table) = readPtr id_info symbol_table + = case entry.ste_kind of + STE_Called indexes + -> (fun_defs, symbol_table <:= (id_info, entry.ste_previous)) + _ + -> (fun_defs, symbol_table) expandMacrosInBody fi_calls {cb_args,cb_rhs} fun_defs mod_index modules es=:{es_symbol_table} -- cgit v1.2.3