From e96c8393ce024d0e9b5fb86b7af112b6fb722b17 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Astor?= Date: Tue, 12 May 2020 18:17:14 +0200 Subject: [PATCH] :art: Improve fptr template parsing --- src/parse/check.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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); -- 2.43.0