From: Jérémie Astor Date: Fri, 29 Apr 2022 16:41:05 +0000 (+0200) Subject: :bug: Fix signature in classes X-Git-Tag: nightly~275^2~15 X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=2abfc1fbe1042ff330cee5ddfa8d357e1944d35f;p=gwion.git :bug: Fix signature in classes --- diff --git a/src/parse/scan0.c b/src/parse/scan0.c index b13f278d..a0d9faf4 100644 --- a/src/parse/scan0.c +++ b/src/parse/scan0.c @@ -64,6 +64,10 @@ ANN m_bool scan0_fptr_def(const Env env, const Fptr_Def fptr) { CHECK_BB(scan0_defined(env, fptr->base->xid, fptr->base->td->pos)); const m_str name = s_name(fptr->base->xid); const Type t = scan0_type(env, name, env->gwion->type[et_fptr]); + if(env->class_def && !strncmp(s_name(fptr->base->xid), "@sig", 4)) { + SET_FLAG(fptr->base, static); + SET_FLAG(fptr->base, global); + } const bool global = !env->class_def && GET_FLAG(fptr->base, global); t->flag |= fptr->base->flag; fptr->type = t;