From c5d0ac6d971afb812f106a5704a1cd625361c5b8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Astor?= Date: Sat, 19 Jun 2021 21:24:33 +0200 Subject: [PATCH] :bug: Fix check_exp_td --- src/parse/check.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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) -- 2.43.0