]> Nishi Git Mirror - gwion.git/commitdiff
:bug: More on effects
authorJérémie Astor <fennecdjay@gmail.com>
Thu, 29 Apr 2021 15:42:07 +0000 (17:42 +0200)
committerJérémie Astor <fennecdjay@gmail.com>
Thu, 29 Apr 2021 15:42:07 +0000 (17:42 +0200)
src/parse/check.c

index e2fc0ce56d5609f346ab3925dffcf545f530b964..00201261db698b002d60a2142e16b87707dd2701 100644 (file)
@@ -1493,7 +1493,7 @@ ANN m_bool check_func_def(const Env env, const Func_Def f) {
   env->func = former;
   if(ret > 0) {
     set_fflag(fdef->base->func, fflag_valid);
-    if(env->class_def && !check_effect_overload(&fdef->base->effects, override->d.func_ref))
+    if(env->class_def && fdef->base->effects.ptr && !check_effect_overload(&fdef->base->effects, override->d.func_ref))
       ERR_B(fdef->base->pos,
           _("too much effects in override."),
           s_name(fdef->base->xid))