CHECK_BB(scan1_exp(env, var->array->exp))
t = array_type(env, decl->type, var->array->depth);
} else if(GET_FLAG(t, abstract) && !GET_FLAG(decl->td, ref)) {
- if(decl->td->xid == insert_symbol("auto"))
- SET_FLAG(decl->td, ref);
- else
- ERR_B(exp_self(decl)->pos, _("Type '%s' is abstract, declare as ref. (use @)"), t->name)
+ if(!(t == env->class_def && env->scope->depth)) {
+ if(decl->td->xid == insert_symbol("auto"))
+ SET_FLAG(decl->td, ref);
+ else
+ ERR_B(exp_self(decl)->pos, _("Type '%s' is abstract, declare as ref. (use @)"), t->name)
+ }
}
const Value v = var->value = var->value ?: new_value(env->gwion->mp, t, s_name(var->xid));
// rewrite logic