gw_err("in file: '%s'\n", env->name);
if(env->class_def)
gw_err("in class: '%s'\n", env->class_def->name);
- if(env->func) // problem with scan1 FAKE_FUNC
+ if(env->func)
gw_err("in function: '%s'\n", env->func->name);
if(pos)
fprintf(stderr, "line: %u\t", pos);
ANN static Func _find_template_match(const Env env, const Value v, const Exp_Call* exp) {
const Exp args = exp->args;
const Type_List types = exp->tmpl->types;
- Func m_func = exp->m_func;
+ Func m_func = exp->m_func, former = env->func;
const m_str tmpl_name = tl2str(env, types);
const m_uint scope = env_push(env, v->owner_class, v->owner);
for(m_uint i = 0; i < v->offset + 1; ++i) {
end:
free(tmpl_name);
env_pop(env, scope);
+ env->func = former;
return m_func;
}
ANN Func find_template_match(const Env env, const Value value, const Exp_Call* exp) {