Fix use of wrong environment for name mangling.

This commit is contained in:
Danila Fedorin 2020-09-17 22:55:27 -07:00
parent 418126ac1f
commit 77c9b27b26

View File

@ -54,7 +54,7 @@ void compiler::translate() {
} }
for(auto& defn : global_defs.defs_defn) { for(auto& defn : global_defs.defs_defn) {
auto& function = defn.second->into_global(global_scp); auto& function = defn.second->into_global(global_scp);
global_env->set_mangled_name(defn.first, function.name); defn.second->env->set_mangled_name(defn.first, function.name);
} }
} }