From 1d7ed6ab395cb12b791de7ea81ab006ced72ed94 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Astor?= Date: Fri, 13 Aug 2021 20:49:25 +0200 Subject: [PATCH] :bug: :art: Fix late warnings --- src/emit/emit.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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"); } -- 2.43.0