From: Jérémie Astor Date: Wed, 20 May 2020 15:54:07 +0000 (+0200) Subject: :bug: Improve overloading check X-Git-Tag: nightly~1534 X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=be87ebb794b63afd56ea967450841da65f734b27;p=gwion.git :bug: Improve overloading check --- diff --git a/src/parse/scan2.c b/src/parse/scan2.c index 72898b02..be22079c 100644 --- a/src/parse/scan2.c +++ b/src/parse/scan2.c @@ -298,7 +298,7 @@ ANN static m_bool scan2_func_def_overload(const Env env, const Func_Def f, const const m_bool base = tmpl_base(f->base->tmpl); const m_bool tmpl = GET_FLAG(overload, template); if(isa(overload->type, env->gwion->type[et_function]) < 0 || is_fptr(env->gwion, overload->type)) { - if(isa(actual_type(env->gwion, overload->type), env->gwion->type[et_function]) < 0) + if(isa(overload->type, env->gwion->type[et_class]) < 0) ERR_B(f->pos, _("function name '%s' is already used by another value"), overload->name) } if((!tmpl && base) || (tmpl && !base && !GET_FLAG(f, template)))