From: Jérémie Astor Date: Thu, 5 Dec 2019 21:49:19 +0000 (+0100) Subject: :art: Remove compiler warning X-Git-Tag: nightly~2070^2 X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=refs%2Fpull%2F162%2Fhead;p=gwion.git :art: Remove compiler warning --- 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))