From: Jérémie Astor Date: Mon, 13 Apr 2020 16:38:54 +0000 (+0200) Subject: :bug: Fix scan_func_def scoping X-Git-Tag: nightly~1705 X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=1756419edb93121041e79bbda6f51e801fcb142c;p=gwion.git :bug: Fix scan_func_def scoping --- diff --git a/src/parse/scan2.c b/src/parse/scan2.c index d35b517d..37c1e1cd 100644 --- a/src/parse/scan2.c +++ b/src/parse/scan2.c @@ -526,11 +526,12 @@ ANN m_bool scan2_func_def(const Env env, const Func_Def f) { const m_bool ret = scanx_fdef(env, env, f, (_exp_func)scan2_fdef); if(GET_FLAG(f, global)) env_pop(env, scope); + CHECK_BB(ret) if(GET_FLAG(f, global) || (f->base->tmpl && !f->base->tmpl->call)) { f->base->func->def = cpy_func_def(env->gwion->mp, f); f->base->func->def->base->func = f->base->func; } - return ret; + return GW_OK; } #define scan2_enum_def dummy_func