return f;
Type t = value->from->owner_class;
while(t && t->nspc) {
- const Value v = nspc_lookup_value0(t->nspc, value->d.func_ref->def->base->xid);
+ Func_Def fdef = value->d.func_ref ? value->d.func_ref->def : value->type->e->d.func->def;
+ const Value v = nspc_lookup_value0(t->nspc, fdef->base->xid);
if(!v)
goto next;
const Func f = _find_template_match(env, v, exp);
CHECK_OB((fdef->base->ret_type = scan1_type(env, fdef->base->td)))
if(!fdef->base->args)
return GW_OK;
- ++env->scope->depth;
- const m_bool ret = scan1_args(env, fdef->base->args);
- --env->scope->depth;
- return ret;
+ RET_NSPC(scan1_args(env, fdef->base->args))
}
ANN m_bool scan1_type_def(const Env env, const Type_Def tdef) {
if(!tmpl_base(fptr->base->tmpl)) {
const Func_Def def = fptr->type->e->d.func->def;
if(def->base->args) {
- ++env->scope->depth;
- const m_bool ret = scan2_args(def);
- --env->scope->depth;
- return ret;
+ RET_NSPC(scan2_args(def))
}
} else
SET_FLAG(fptr->type, func);