From a807c9b79cae2f34c7cd424624aa6e4ecabbbb57 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Astor?= Date: Tue, 16 Jun 2020 22:00:47 +0200 Subject: [PATCH] :art: ADD_REF in env_add_type --- src/env/env.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/env/env.c b/src/env/env.c index 305544c8..4d051660 100644 --- a/src/env/env.c +++ b/src/env/env.c @@ -80,6 +80,7 @@ ANN void env_pop(const Env env, const m_uint scope) { ANN void env_add_type(const Env env, const Type type) { const Type v_type = type_copy(env->gwion->mp, env->gwion->type[et_class]); + ADD_REF(v_type); v_type->e->d.base_type = type; SET_FLAG(type, builtin); const Symbol sym = insert_symbol(type->name); -- 2.43.0