From: Jérémie Astor Date: Fri, 13 Aug 2021 18:49:25 +0000 (+0200) Subject: :bug: :art: Fix late warnings X-Git-Tag: nightly~470^2~92 X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=1d7ed6ab395cb12b791de7ea81ab006ced72ed94;p=gwion.git :bug: :art: Fix late warnings --- diff --git a/src/emit/emit.c b/src/emit/emit.c index 39ac9849..4b348a8a 100644 --- a/src/emit/emit.c +++ b/src/emit/emit.c @@ -973,8 +973,8 @@ ANN static m_bool emit_decl(const Emitter emit, const Exp_Decl *decl) { CHECK_BB(op_emit(emit, &opi)); } set_late(emit->gwion, decl, list->self); - if ((GET_FLAG(array_base(v->type), abstract) && !GET_FLAG(decl->td, late) && - GET_FLAG(v, late)) || (!exp_self(decl)->emit_var &&late_array(decl->td, list->self))) { + if (!exp_self(decl)->emit_var && GET_FLAG(array_base(v->type), abstract) && !GET_FLAG(decl->td, late) && + GET_FLAG(v, late) && late_array(decl->td, list->self)) { env_warn(emit->env, decl->td->pos, _("Type '%s' is abstract, use {+G}late{0} instead of {G+}%s{0}"), v->type->name, !GET_FLAG(decl->td, const) ? "var" : "const"); }