From: fennecdjay Date: Thu, 19 Sep 2019 01:09:46 +0000 (+0200) Subject: :bug: Fix tuples and too many exp to match X-Git-Tag: nightly~2216^2~1 X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=cec2b78e5aa3de4d41ec132bebd3bd4553b67b77;p=gwion.git :bug: Fix tuples and too many exp to match --- diff --git a/src/lib/tuple.c b/src/lib/tuple.c index e2a4c660..b3a55d25 100644 --- a/src/lib/tuple.c +++ b/src/lib/tuple.c @@ -332,7 +332,8 @@ GWION_IMPORT(tuple) { GWI_BB(gwi_class_end(gwi)) SET_FLAG(t_tuple, abstract | ae_flag_template); GWI_BB(gwi_oper_ini(gwi, "Object", "Tuple", NULL)) - GWI_BB(gwi_oper_add(gwi, opck_at_object_tuple)) + GWI_BB(gwi_oper_add(gwi, opck_at_tuple)) + GWI_BB(gwi_oper_emi(gwi, opem_at_tuple)) GWI_BB(gwi_oper_end(gwi, "@=>", ObjectAssign)) GWI_BB(gwi_oper_add(gwi, opck_cast_tuple)) GWI_BB(gwi_oper_end(gwi, "$", NULL)) @@ -350,10 +351,6 @@ GWION_IMPORT(tuple) { GWI_BB(gwi_oper_add(gwi, opck_at_tuple)) GWI_BB(gwi_oper_emi(gwi, opem_at_tuple)) GWI_BB(gwi_oper_end(gwi, "@=>", NULL)) - GWI_BB(gwi_oper_add(gwi, opck_cast_tuple)) - GWI_BB(gwi_oper_end(gwi, "$", NULL)) - GWI_BB(gwi_oper_add(gwi, opck_impl_tuple)) - GWI_BB(gwi_oper_end(gwi, "@implicit", NULL)) register_freearg(gwi, TupleUnpack, freearg_tuple_at); return GW_OK; } diff --git a/src/parse/check.c b/src/parse/check.c index 2d209fb7..9a3b9c21 100644 --- a/src/parse/check.c +++ b/src/parse/check.c @@ -1188,6 +1188,8 @@ ANN static m_bool match_case_exp(const Env env, Exp e) { CHECK_OB(op_check(env, &opi)) } } + if(e) + ERR_B(e->pos, _("too many expression to match")) return GW_OK; }