From cce9043d5dfe387b33b082f7d1a976fc57f35f92 Mon Sep 17 00:00:00 2001 From: fennecdjay Date: Sun, 8 Sep 2019 23:53:33 +0200 Subject: [PATCH] :art: more type_contains --- src/parse/scan1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/parse/scan1.c b/src/parse/scan1.c index fcb5c35c..950dff75 100644 --- a/src/parse/scan1.c +++ b/src/parse/scan1.c @@ -91,7 +91,7 @@ ANN m_bool scan1_exp_decl(const Env env, const Exp_Decl* decl) { t = array_type(env, decl->type, var->array->depth); } else if(GET_FLAG(t, abstract) && !GET_FLAG(decl->td, ref)) ERR_B(exp_self(decl)->pos, _("Type '%s' is abstract, declare as ref. (use @)"), t->name) - if(env->class_def && isa(t, t_object) > 0) + if(env->class_def) type_contains(env->class_def, t); const Value v = var->value = former ?: new_value(env->gwion->mp, t, s_name(var->xid)); nspc_add_value(nspc, var->xid, v); -- 2.43.0