From 789bdae88c4784943f3ea0e037ec742451c29b01 Mon Sep 17 00:00:00 2001 From: fennecdjay Date: Mon, 7 Oct 2019 21:32:50 +0200 Subject: [PATCH] :bug: Fix fptr import --- src/parse/scan0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/parse/scan0.c b/src/parse/scan0.c index 2f5e096a..1e7c88ee 100644 --- a/src/parse/scan0.c +++ b/src/parse/scan0.c @@ -91,7 +91,7 @@ ANN m_bool scan0_fptr_def(const Env env, const Fptr_Def fptr) { const Type t = scan0_type(env, env->gwion->type[et_fptr]->xid, name, env->gwion->type[et_fptr]); t->e->owner = !(!env->class_def && GET_FLAG(fptr->base->td, global)) ? env->curr : env->global_nspc; - if(GET_FLAG(fptr->base->td, global)) + if(GET_FLAG(fptr->base->td, global) && env->context) env->context->global = 1; t->nspc = new_nspc(env->gwion->mp, name); t->flag = fptr->base->td->flag; -- 2.43.0