From 2abfc1fbe1042ff330cee5ddfa8d357e1944d35f Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Astor?= Date: Fri, 29 Apr 2022 18:41:05 +0200 Subject: [PATCH] :bug: Fix signature in classes --- src/parse/scan0.c | 4 ++++ 1 file changed, 4 insertions(+) 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; -- 2.43.0