From: Jérémie Astor Date: Thu, 12 Aug 2021 14:31:56 +0000 (+0200) Subject: :art: Remove late aray warning if emit_var X-Git-Tag: nightly~470^2~98 X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=e6f2626c9d3b94f653a736e981036e359ad18204;p=gwion.git :art: Remove late aray warning if emit_var --- diff --git a/src/emit/emit.c b/src/emit/emit.c index cda5ffb0..39ac9849 100644 --- a/src/emit/emit.c +++ b/src/emit/emit.c @@ -974,7 +974,7 @@ ANN static m_bool emit_decl(const Emitter emit, const Exp_Decl *decl) { } set_late(emit->gwion, decl, list->self); if ((GET_FLAG(array_base(v->type), abstract) && !GET_FLAG(decl->td, late) && - GET_FLAG(v, late)) || late_array(decl->td, list->self)) { + GET_FLAG(v, late)) || (!exp_self(decl)->emit_var &&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"); }