From: fennecdjay Date: Sun, 8 Sep 2019 21:53:33 +0000 (+0200) Subject: :art: more type_contains X-Git-Tag: nightly~2227 X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=cce9043d5dfe387b33b082f7d1a976fc57f35f92;p=gwion.git :art: more type_contains --- 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);