From: Jérémie Astor Date: Sat, 15 May 2021 01:47:43 +0000 (+0200) Subject: :bug: Fix ctor with arrays X-Git-Tag: nightly~661 X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=3c56047fa0a4e234a1304948cc1122fd234e6c30;p=gwion.git :bug: Fix ctor with arrays --- diff --git a/src/lib/array.c b/src/lib/array.c index 0a2164cf..ba9a5e61 100644 --- a/src/lib/array.c +++ b/src/lib/array.c @@ -691,7 +691,6 @@ static OP_CHECK(opck_array_scan) { t->nspc->dtor->native_func = (m_uint) (!tflag(base, tflag_struct) ? array_dtor_obj : array_dtor_struct); } - unset_tflag(t, tflag_ctor); return t; } diff --git a/src/parse/check.c b/src/parse/check.c index 6de80a08..be09cde9 100644 --- a/src/parse/check.c +++ b/src/parse/check.c @@ -1600,7 +1600,10 @@ ANN static bool class_def_has_body(Ast ast) { continue; Var_Decl_List dlist = exp->d.exp_decl.list; do { - if(tflag(dlist->self->value->type, tflag_ctor)) + if(GET_FLAG(dlist->self->value, late)) + continue; + if(tflag(dlist->self->value->type, tflag_ctor) || + dlist->self->value->type->array_depth) return true; } while((dlist = dlist->next)); } else