From 39ca7860dbd5e0761cb963042a3e656f5acde428 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Astor?= Date: Mon, 30 Nov 2020 20:18:57 +0100 Subject: [PATCH] :art: Improve scan_class --- 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 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) } -- 2.43.0