From cf8eaddbeaab6956dcd6ae0edfacc9b3f2f2e157 Mon Sep 17 00:00:00 2001 From: fennecdjay Date: Wed, 3 Jul 2019 16:21:29 +0200 Subject: [PATCH] :art: Allow func named as types --- src/parse/scan2.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/parse/scan2.c b/src/parse/scan2.c index b09ce505..25b536af 100644 --- a/src/parse/scan2.c +++ b/src/parse/scan2.c @@ -522,9 +522,9 @@ ANN2(1,2) m_bool scan2_fdef(const Env env, const Func_Def f, const Value overloa ANN m_bool scan2_func_def(const Env env, const Func_Def f) { const m_uint scope = !GET_FLAG(f, global) ? env->scope->depth : env_push_global(env); const Value overload = nspc_lookup_value0(env->curr, f->base->xid); - const Value res = nspc_lookup_value1(env->global_nspc, f->base->xid); - if(res) - ERR_B(f->pos, _("'%s' already declared as type"), s_name(f->base->xid)) +// const Value res = nspc_lookup_value1(env->global_nspc, f->base->xid); +// if(res) +// ERR_B(f->pos, _("'%s' already declared as type"), s_name(f->base->xid)) f->stack_depth = (env->class_def && !GET_FLAG(f, static) && !GET_FLAG(f, global)) ? SZ_INT : 0; if(GET_FLAG(f, variadic)) f->stack_depth += SZ_INT; -- 2.43.0