From f08ccc8b9eb3c177e153a36142da2f1bed7645fd Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Astor?= Date: Thu, 5 Dec 2019 22:49:19 +0100 Subject: [PATCH] :art: Remove compiler warning --- src/parse/check.c | 2 +- src/parse/scan2.c | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/parse/check.c b/src/parse/check.c index e7b629ea..45dfc7cb 100644 --- a/src/parse/check.c +++ b/src/parse/check.c @@ -784,7 +784,7 @@ ANN Type check_exp_call1(const Env env, const Exp_Call *exp) { ANN static Type check_exp_binary(const Env env, const Exp_Binary* bin) { CHECK_OO(check_exp(env, bin->lhs)) - const is_auto = bin->rhs->exp_type == ae_exp_decl && bin->rhs->d.exp_decl.type == env->gwion->type[et_auto]; + const m_bool is_auto = bin->rhs->exp_type == ae_exp_decl && bin->rhs->d.exp_decl.type == env->gwion->type[et_auto]; if(is_auto) bin->rhs->type = bin->rhs->d.exp_decl.type = bin->lhs->type; CHECK_OO(check_exp(env, bin->rhs)) diff --git a/src/parse/scan2.c b/src/parse/scan2.c index 3f25a59e..de18c9c1 100644 --- a/src/parse/scan2.c +++ b/src/parse/scan2.c @@ -328,6 +328,9 @@ ANN static Func scan_new_func(const Env env, const Func_Def f, const m_str name) ANN static Type func_type(const Env env, const Func func) { const Type t = type_copy(env->gwion->mp, env->gwion->type[func->def->base->td ? et_function : et_lambda]); + t->xid = ++env->scope->type_xid; +// = type_copy(env->gwion->mp, env->gwion->type[func->def->base->td ? et_function : et_lambda]); + t->e->parent = env->gwion->type[func->def->base->td ? et_function : et_lambda]; t->name = func->name; t->e->owner = env->curr; if(GET_FLAG(func, member)) -- 2.43.0