From: Jérémie Astor Date: Mon, 30 Nov 2020 19:18:57 +0000 (+0100) Subject: :art: Improve scan_class X-Git-Tag: nightly~1140^2~6 X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=39ca7860dbd5e0761cb963042a3e656f5acde428;p=gwion.git :art: Improve scan_class --- diff --git a/src/lib/object_op.c b/src/lib/object_op.c index 795166b7..3269f890 100644 --- a/src/lib/object_op.c +++ b/src/lib/object_op.c @@ -114,7 +114,7 @@ static OP_EMIT(opem_implicit_null2obj) { ANN /*static*/ Type scan_class(const Env env, const Type t, const Type_Decl* td); static Type opck_object_scan(const Env env, const struct TemplateScan *ts) { - if(ts->td->types) + if(ts->t->info->cdef && ts->t->info->cdef->base.tmpl->call) return scan_class(env, ts->t, ts->td) ?: env->gwion->type[et_null]; ERR_N(td_pos(ts->td), _("you must provide template types for type '%s'"), ts->t->name) }