const Var_Decl var = list->self;
CHECK_BB(isres(env, var->xid, exp_self(decl)->pos))
Type t = decl->type;
- const Value former = ((!env->class_def && !env->scope->depth) ?
- nspc_lookup_value1 : nspc_lookup_value0)(env->curr, var->xid);
- if(former)
+ if(nspc_lookup_value2(env->curr, var->xid))
ERR_B(var->pos, _("variable %s has already been defined in the same scope..."),
s_name(var->xid))
if(var->array) {
else
ERR_B(exp_self(decl)->pos, _("Type '%s' is abstract, declare as ref. (use @)"), t->name)
}
- const Value v = var->value = former ?: new_value(env->gwion->mp, t, s_name(var->xid));
+ const Value v = var->value = new_value(env->gwion->mp, t, s_name(var->xid));
if(SAFE_FLAG(env->class_def, struct) && !GET_FLAG(decl->td, static)) {
v->from->offset = env->class_def->size;
env->class_def->size += t->size;