CHECK_BB(push(es, t->e->owner_class))
else
env_push(es->env, NULL, es->env->context->nspc);
- if(!(t->flag & es->flag))
+ if(es->func && !(t->flag & es->flag))
CHECK_BB(es->func((void*)es->data, t->e->def))
if(GET_FLAG(t, template))
CHECK_BB(template_push_types(es->env, t->e->def->base.tmpl))
ptr = known_type(env, &td);
td0->array = NULL;
free_type_decl(env->gwion->mp, td0);
- if(!GET_FLAG(ptr, check) && ptr->e->def) {
- struct EnvSet es = { .env=env, .data=env, .func=(_exp_func)traverse_cdef,
- .scope=env->scope->depth, .flag=ae_flag_check };
- CHECK_BB(envset_run(&es, get_type(ptr)))
- }
+ const Type base = get_type(ptr);
+ if(!GET_FLAG(base, check))
+ CHECK_BB(ensure_traverse(env, base))
}
t = (!stmt->is_ptr && depth) ? array_type(env, ptr, depth) : ptr;
stmt->v = new_value(env->gwion->mp, t, s_name(stmt->sym));
}
ANN static m_bool type_recursive(const Env env, const Type_Decl *td, const Type t) {
+ const Type base = get_type(t);
if(!GET_FLAG(td, ref) && env->class_def && !env->scope->depth &&
- t == env->class_def) {
+ base == env->class_def) {
ERR_B(td_pos(td), _("%s declared inside %s\n. (make it a ref ?)"),
t->name, t == env->class_def ? "itself" : env->class_def->name);
}