]> Nishi Git Mirror - gwion.git/commitdiff
:art: Improve fptr template parsing
authorJérémie Astor <astor.jeremie@wanadoo.fr>
Tue, 12 May 2020 16:17:14 +0000 (18:17 +0200)
committerJérémie Astor <astor.jeremie@wanadoo.fr>
Tue, 12 May 2020 16:17:14 +0000 (18:17 +0200)
src/parse/check.c

index e29b959fb4dfc5e599693b892384895e9db02949..9270a82d7ff084a4e63bf084e3e388ee94f938a1 100644 (file)
@@ -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);