From 9c756424254064eff1c3d4d6831cfcfebbd6ffa8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Astor?= Date: Wed, 13 May 2020 11:15:12 +0200 Subject: [PATCH] :art: Improve envset --- src/env/envset.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/env/envset.c b/src/env/envset.c index cfa938c9..b57df234 100644 --- a/src/env/envset.c +++ b/src/env/envset.c @@ -20,6 +20,8 @@ ANN static void check(struct EnvSet *es, const Type t) { ANN static m_bool push(struct EnvSet *es, const Type t) { if(t->e->owner_class) CHECK_BB(push(es, t->e->owner_class)) + else + env_push(es->env, NULL, es->env->context->nspc); if(!(t->flag & es->flag)) CHECK_BB(es->func((void*)es->data, t->e->def)) if(GET_FLAG(t, template)) @@ -48,6 +50,8 @@ ANN2(1) void envset_pop(struct EnvSet *es, const Type t) { nspc_pop_type(es->env->gwion->mp, es->env->curr); if(t->e->owner_class) envset_pop(es, t); + else + env_pop(es->env, es->scope); } ANN m_bool envset_run(struct EnvSet *es, const Type t) { -- 2.43.0