From e6f2626c9d3b94f653a736e981036e359ad18204 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Astor?= Date: Thu, 12 Aug 2021 16:31:56 +0200 Subject: [PATCH] :art: Remove late aray warning if emit_var --- src/emit/emit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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"); } -- 2.43.0