int i = 0;
do {
if(e->exp_type == ae_exp_decl) {
- e->d.exp_decl.td->xid->xid = insert_symbol(//could be better
- ((Type)VPTR(&bin->lhs->type->e->tuple->types, i))->name);
+ DECL_OO(const Type, t, = (Type)VPTR(&bin->lhs->type->e->tuple->types, i))
+ e->d.exp_decl.td->xid->xid = insert_symbol(t->name);
CHECK_BO(traverse_decl(env, &e->d.exp_decl))
}
++i;
if(et != ae_exp_primary && et != ae_exp_dot && et != ae_exp_cast)
ERR_B(exp->func->pos, _("invalid expression for function call."))
CHECK_OB(check_exp(env, exp->func))
- return exp->args ? !!check_exp(env, exp->args) : GW_OK;
+ if(exp->args)
+ CHECK_OB(check_exp(env, exp->args))
+ return GW_OK;
}
ANN static inline Value template_get_ready(const Env env, const Value v, const m_str tmpl, const m_uint i) {
const Type t = actual_type(exp->func->type);
const Value v = nspc_lookup_value1(t->e->owner, insert_symbol(t->name));
assert(v);
- if(!GET_FLAG(v, func) && !GET_FLAG(exp->func->type, func))
+ if(!GET_FLAG(v, func) && !GET_FLAG(exp->func->type, func) )
ERR_O(exp_self(exp)->pos, _("template call of non-function value."))
- if(!v->d.func_ref->def->base->tmpl)
+ if(!v->d.func_ref || !v->d.func_ref->def->base->tmpl)
ERR_O(exp_self(exp)->pos, _("template call of non-template function."))
if(t->e->d.func->def->base->tmpl->call) {
if(env->func == t->e->d.func) {
return GW_OK;
CHECK_BB(scan1_exp(env, exp_call->func))
const Exp args = exp_call->args;
- return args ? scan1_exp(env, args) : 1;
+ return args ? scan1_exp(env, args) : GW_OK;
}
ANN static inline m_bool scan1_exp_dot(const Env env, const Exp_Dot* member) {