do ++count;
while((e = e->next));
const Type type = array->type;
- const Type base = array_base(type);
const Instr push = emit_add_instr(emit, RegSetImm);
push->m_val = count;
const Instr instr = emit_add_instr(emit, ArrayInit);
instr->m_val = (m_uint)type;
- instr->m_val2 = base->size;
+ instr->m_val2 = type->array_depth == 1 ? array_base(type)->size : SZ_INT;
emit_add_instr(emit, GcAdd);
return GW_OK;
}
if(!value) {
env_err(env, member->base->pos,
"class '%s' has no member '%s'", the_base->name, str);
- did_you_mean_type(member->t_base, str);
+ if(member->t_base->nspc)
+ did_you_mean_type(member->t_base, str);
return NULL;
}
if(!env->class_def || isa(env->class_def, value->owner_class) < 0) {
ANN static inline m_bool scan1_exp_primary(const Env env, const Exp_Primary* prim) { GWDEBUG_EXE
if(prim->primary_type == ae_primary_hack)
return scan1_exp(env, prim->d.exp);
+ if(prim->primary_type == ae_primary_array && prim->d.array->exp)
+ return scan1_exp(env, prim->d.array->exp);
return GW_OK;
}
const Value v = prim_value(env, prim->d.var);
if(v)
SET_FLAG(v, used);
- }
+ } else if(prim->primary_type == ae_primary_array && prim->d.array->exp)
+ return scan2_exp(env, prim->d.array->exp);
return GW_OK;
}