From 3a186d6668349e5a2efb93ca56be13b65020b6f9 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Astor?= Date: Tue, 5 May 2020 00:17:09 +0200 Subject: [PATCH] :bug: Fix push_global --- src/gwion.c | 2 +- src/import/checker.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gwion.c b/src/gwion.c index b8a73e6c..97d42f06 100644 --- a/src/gwion.c +++ b/src/gwion.c @@ -178,7 +178,7 @@ ANN struct SpecialId_* specialid_get(const Gwion gwion, const Symbol sym) { ANN void push_global(struct Gwion_ *gwion, const m_str name) { const Nspc nspc = new_nspc(gwion->mp, name); nspc->parent = gwion->env->global_nspc; - gwion->env->global_nspc = nspc; + gwion->env->curr = gwion->env->global_nspc = nspc; } ANN Nspc pop_global(struct Gwion_ *gwion) { diff --git a/src/import/checker.c b/src/import/checker.c index 1da445e3..03a6c524 100644 --- a/src/import/checker.c +++ b/src/import/checker.c @@ -35,6 +35,7 @@ ANN static m_bool ac_run(const Gwi gwi, struct AC *ac); ANN static Array_Sub mk_array(MemPool mp, struct AC *ac) { const Array_Sub array = new_array_sub(mp, ac->base); array->depth = ac->depth; + array->exp = ac->base; return array; } -- 2.43.0