From 846d09eee2045517f6a558ca02f8512c5bd4017a Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Astor?= Date: Thu, 10 Sep 2020 23:21:50 +0200 Subject: [PATCH] :art: Type_check td->exp in a scope of its own --- src/parse/check.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/parse/check.c b/src/parse/check.c index c6973072..18381e03 100644 --- a/src/parse/check.c +++ b/src/parse/check.c @@ -84,17 +84,17 @@ ANN static m_bool check_fptr_decl(const Env env, const Var_Decl var) { return GW_OK; } -ANN Type check_td(const Env env, Type_Decl *td) { - CHECK_BO(scan1_exp(env, td->exp)) - CHECK_BO(scan2_exp(env, td->exp)) - CHECK_OO(check_exp(env, td->exp)) +ANN static inline m_bool check_td_exp(const Env env, Type_Decl *td) { + RET_NSPC(traverse_exp(env, td->exp)) +} + +ANN static Type check_td(const Env env, Type_Decl *td) { + CHECK_BO(check_td_exp(env, td)) const Type t = actual_type(env->gwion, td->exp->info->type); assert(t); if(GET_FLAG(t, template) && !GET_FLAG(t, ref)) ERR_O(td_pos(td), _("type '%s' needs template types"), t->name) - td->xid = insert_symbol("@resolved"); - if(t->array_depth) - SET_FLAG(td, force); + td->xid = insert_symbol("auto"); return t; } -- 2.43.0