From 1756419edb93121041e79bbda6f51e801fcb142c Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Astor?= Date: Mon, 13 Apr 2020 18:38:54 +0200 Subject: [PATCH] :bug: Fix scan_func_def scoping --- src/parse/scan2.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 -- 2.43.0