From: Jérémie Astor Date: Sat, 19 Jun 2021 19:24:33 +0000 (+0200) Subject: :bug: Fix check_exp_td X-Git-Tag: nightly~582 X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=c5d0ac6d971afb812f106a5704a1cd625361c5b8;p=gwion.git :bug: Fix check_exp_td --- diff --git a/src/parse/check.c b/src/parse/check.c index ab179976..1a20886b 100644 --- a/src/parse/check.c +++ b/src/parse/check.c @@ -1056,7 +1056,9 @@ ANN static Type check_exp_lambda(const Env env, const Exp_If *exp_if NUSED) { ANN static Type check_exp_td(const Env env, Type_Decl **td) { DECL_OO(const Type, t, = known_type(env, *td)); - return type_class(env->gwion, t); + if(isa(t, env->gwion->type[et_function]) > 0 && !is_fptr(env->gwion, t)) + return type_class(env->gwion, t); + return t; } DECL_EXP_FUNC(check, Type, Env)