From: Jérémie Astor Date: Fri, 10 Sep 2021 11:13:42 +0000 (+0200) Subject: :art: use ensure_traverse for operator new X-Git-Tag: nightly~450 X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=1bf4862df5f7dfd63741eecaed12c094132f8f98;p=gwion.git :art: use ensure_traverse for operator new --- diff --git a/src/lib/opfunc.c b/src/lib/opfunc.c index 1cc26d58..57045b61 100644 --- a/src/lib/opfunc.c +++ b/src/lib/opfunc.c @@ -99,6 +99,7 @@ ANN Type check_td(const Env env, Type_Decl *td); OP_CHECK(opck_new) { Exp_Unary *unary = (Exp_Unary *)data; DECL_ON(const Type, t, = known_type(env, unary->ctor.td)); + CHECK_BN(ensure_traverse(env, t)); if (type_ref(t)) ERR_N(unary->ctor.td->pos, _("can't use 'new' on ref type '%s'\n"), t->name); if (tflag(t, tflag_infer))