Commit 76f7e264 authored by Martin Wierich's avatar Martin Wierich
Browse files

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
	f x = x
caused an abort
parent dbc49067
......@@ -721,10 +721,15 @@ where
removeFunctionCallsFromSymbolTable calls fun_defs symbol_table
= foldSt remove_function_call_from_symbol_table calls (fun_defs, symbol_table)
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}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment