From 1bf4862df5f7dfd63741eecaed12c094132f8f98 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Astor?= Date: Fri, 10 Sep 2021 13:13:42 +0200 Subject: [PATCH] :art: use ensure_traverse for operator new --- src/lib/opfunc.c | 1 + 1 file changed, 1 insertion(+) 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)) -- 2.43.0