]> Nishi Git Mirror - gwion.git/commitdiff
:bug: :art: Fix late warnings
authorJérémie Astor <fennecdjay@gmail.com>
Fri, 13 Aug 2021 18:49:25 +0000 (20:49 +0200)
committerJérémie Astor <fennecdjay@gmail.com>
Fri, 13 Aug 2021 18:49:25 +0000 (20:49 +0200)
src/emit/emit.c

index 39ac9849dea7e864569dbaba574a86c37f2a6c2c..4b348a8a7ade40f99622e1daa2b99a5f46c918c6 100644 (file)
@@ -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");
     }