const Func func = get_template_func(env, &tmp_func, base, value);
if(base->exp_type == ae_exp_call)
base->d.exp_call.m_func = func;
- else if(base->exp_type == ae_exp_binary)
+ else // if(base->exp_type == ae_exp_binary)
base->d.exp_binary.func = func;
return func ? func->def->ret_type : NULL;
}
return GW_OK;
if(!GET_FLAG(v, const))
ERR_B(stmt->val->pos, "'%s' is not constant.", v->name)
- if(!GET_FLAG(v, builtin) && !GET_FLAG(v, enum))
- vector_add(&env->sw->exp, (vtype)stmt->val);
+ if(!GET_FLAG(v, builtin) && !GET_FLAG(v, enum))
+ vector_add(&env->sw->exp, (vtype)stmt->val);
return GW_OK;
}
return GW_OK;
}
-ANN static m_bool handle_instr(const Emitter emit, const M_Operator* mo) {
+ANN static m_bool handle_instr(const Emitter emit, const M_Operator* mo) {
if(mo->func) {
const Instr instr = emit_add_instr(emit, RegPushImm);
*(Func*)instr->ptr = mo->func;
ANN m_bool scan1_stmt_union(const Env env, const Stmt_Union stmt) { GWDEBUG_EXE
Decl_List l = stmt->l;
const m_uint scope = union_push(env, stmt);
- if(stmt->xid)
- UNSET_FLAG(stmt, private);
- else if(stmt->type_xid)
+ if(stmt->xid || stmt->type_xid)
UNSET_FLAG(stmt, private);
do {
const Exp_Decl decl = l->self->d.exp_decl;