From: Jérémie Astor Date: Sat, 9 May 2020 19:23:38 +0000 (+0200) Subject: :bug: Fix scan_class for builtin template X-Git-Tag: nightly~1616 X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=55f9c9a22860fffbbcdb68a9a19506b1beda1cb6;p=gwion.git :bug: Fix scan_class for builtin template --- diff --git a/src/lib/object_op.c b/src/lib/object_op.c index 5736314c..6a80937b 100644 --- a/src/lib/object_op.c +++ b/src/lib/object_op.c @@ -407,7 +407,7 @@ ANN static Type scan_class(const Env env, const Type t, const Type_Decl* td) { return a->base.type; struct EnvSet es = { .env=env, .data=env, .func=(_exp_func)scan0_cdef, .scope=env->scope->depth, .flag=ae_flag_scan0 }; - CHECK_BO(envset_push(&es, t->e->owner_class, env->context->nspc)) + CHECK_BO(envset_push(&es, t->e->owner_class, env->context ? env->context->nspc : env->curr)) a->base.tmpl = mk_tmpl(env, t->e->def->base.tmpl, td->types); const m_bool ret = _scan_class(env, t, a); if(es.run)