diff options
Diffstat (limited to 'src/compile.cpp')
-rw-r--r-- | src/compile.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/compile.cpp b/src/compile.cpp index 6a6eb06..8cde2e8 100644 --- a/src/compile.cpp +++ b/src/compile.cpp @@ -101,8 +101,8 @@ compile_def(CEnv& cenv, const ATuple* def) throw() cenv.def(sym, body, cenv.type(body), NULL); // define stub first for recursion CVal val = resp_compile(cenv, body); if (cenv.vals.size() == 1 && cenv.type(body)->head()->str() != "Fn") { - val = cenv.engine()->compileGlobal( - cenv, cenv.type(body), sym->str(), val); + val = cenv.engine()->compileGlobalSet( + cenv, sym->str(), val, cenv.type(body)); cenv.lock(def); } cenv.vals.def(sym, val); |