From 55f9c9a22860fffbbcdb68a9a19506b1beda1cb6 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Astor?= Date: Sat, 9 May 2020 21:23:38 +0200 Subject: [PATCH] :bug: Fix scan_class for builtin template --- src/lib/object_op.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) -- 2.43.0