From 8a9b80ac790031ea6b0c30d59b07e14a0ad21c6e Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Astor?= Date: Thu, 17 Dec 2020 11:34:22 +0100 Subject: [PATCH] :bug: Parse td[x][y] in decl --- src/parse/check.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/parse/check.c b/src/parse/check.c index 316b9d4a..cfa39e0c 100644 --- a/src/parse/check.c +++ b/src/parse/check.c @@ -172,6 +172,8 @@ ANN static inline m_bool inferable(const Env env, const Type t, const loc_t pos) ANN Type check_exp_decl(const Env env, const Exp_Decl* decl) { if(!decl->td->xid) return no_xid(env, decl); + if(decl->td->array && decl->td->array->exp) + CHECK_OO(check_exp(env, decl->td->array->exp)) if(decl->td->xid == insert_symbol("auto")) { // should be better CHECK_BO(scan1_exp(env, exp_self(decl))) CHECK_BO(scan2_exp(env, exp_self(decl))) -- 2.43.0