From: Jérémie Astor Date: Tue, 12 May 2020 16:17:14 +0000 (+0200) Subject: :art: Improve fptr template parsing X-Git-Tag: nightly~1573^2 X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=e96c8393ce024d0e9b5fb86b7af112b6fb722b17;p=gwion.git :art: Improve fptr template parsing --- diff --git a/src/parse/check.c b/src/parse/check.c index e29b959f..9270a82d 100644 --- a/src/parse/check.c +++ b/src/parse/check.c @@ -581,7 +581,8 @@ ANN Func find_template_match(const Env env, const Value value, const Exp_Call* e 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);