diff --git a/src/set/set.c b/src/set/set.c index e752299..c2714e3 100644 --- a/src/set/set.c +++ b/src/set/set.c @@ -1,3 +1,4 @@ +#include "cfg/opt.h" #include #include #include @@ -2626,6 +2627,12 @@ int createFunction(Function* function, AST_NODE_PTR currentNode) { return SEMANTIC_ERROR; } + // compose function name by appending parent modules + char* modules = module_ref_to_str(currentNode->location.module_ref); + char* composed_name = g_strjoin("", modules, ":", function->name, NULL); + g_free(modules); + function->name = composed_name; + mem_free(functionParameter); functionParameter = NULL;