From be87ebb794b63afd56ea967450841da65f734b27 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Astor?= Date: Wed, 20 May 2020 17:54:07 +0200 Subject: [PATCH] :bug: Improve overloading check --- src/parse/scan2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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))) -- 2.43.0