From 1e347817dc39c6a4df44aa5cf888819a554360b0 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Astor?= Date: Wed, 11 May 2022 20:32:51 +0200 Subject: [PATCH] :bug: Fix signature's storage --- src/parse/type_decl.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/parse/type_decl.c b/src/parse/type_decl.c index 2106ba7d..d77a7c41 100644 --- a/src/parse/type_decl.c +++ b/src/parse/type_decl.c @@ -73,15 +73,15 @@ ANN static Symbol symname(const Env env, Func_Base *const base, bool *global) { ANN static inline Type find(const Env env, Type_Decl *td) { if (!td->fptr) return find_type(env, td); - bool global; + bool global = false; CHECK_OO((td->xid = symname(env, td->fptr->base, &global))); const Fptr_Def fptr = td->fptr; td->fptr = NULL; const Type exists = find_type(env, td); if(exists) return exists; - const m_uint scope = !global - ? env_push_global(env) - : env_push(env, NULL, env->context->nspc); + const m_uint scope = env->context + ? env_push(env, NULL, env->context->nspc) + : env_push_global(env); const m_bool ret = traverse_fptr_def(env, fptr); env_pop(env, scope); const Type t = fptr->type; -- 2.43.0