From: fennecdjay Date: Tue, 8 Oct 2019 14:28:13 +0000 (+0200) Subject: :art: Testing X-Git-Tag: nightly~2198^2~92 X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=b6d5a24ee7276571e64799e8dce1913d644ca23b;p=gwion.git :art: Testing --- diff --git a/src/lib/tuple.c b/src/lib/tuple.c index 0ef8172b..8af9b3d8 100644 --- a/src/lib/tuple.c +++ b/src/lib/tuple.c @@ -199,7 +199,6 @@ static OP_EMIT(opem_at_tuple_object) { \ return emit_add_instr(emit, ObjectAssign); \ } mk_opem_tuple2object(cast, Exp_Cast *, exp_self(exp)->type) -mk_opem_tuple2object(impl, struct Implicit *, exp->t) static OP_CHECK(opck_cast_tuple) { const Exp_Cast *cast = (Exp_Cast*)data; @@ -351,7 +350,7 @@ GWION_IMPORT(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)) + GWI_BB(gwi_oper_end(gwi, "$", NoOp)) GWI_BB(gwi_oper_add(gwi, opck_impl_tuple)) GWI_BB(gwi_oper_end(gwi, "@implicit", NULL)) GWI_BB(gwi_oper_ini(gwi, "Tuple", "Object", NULL)) @@ -362,7 +361,6 @@ GWION_IMPORT(tuple) { GWI_BB(gwi_oper_emi(gwi, opem_cast_tuple_object)) GWI_BB(gwi_oper_end(gwi, "$", NULL)) GWI_BB(gwi_oper_add(gwi, opck_impl_tuple)) - GWI_BB(gwi_oper_emi(gwi, opem_impl_tuple_object)) GWI_BB(gwi_oper_end(gwi, "@implicit", NULL)) GWI_BB(gwi_oper_ini(gwi, "Tuple", "Tuple", NULL)) GWI_BB(gwi_oper_add(gwi, opck_at_tuple)) diff --git a/tests/internal_op/implicit_similar.gw b/tests/internal_op/implicit_similar.gw index 1775c26b..01b26b75 100644 --- a/tests/internal_op/implicit_similar.gw +++ b/tests/internal_op/implicit_similar.gw @@ -1,3 +1,5 @@ typedef int INT; fun void test(INT i) { <<< i >>>; } +fun void test2(int i) { <<< i >>>; } 1 => test; +INT i => test2; diff --git a/tests/tuple/cast_tuple.gw b/tests/tuple/cast_tuple.gw new file mode 100644 index 00000000..d30202d2 --- /dev/null +++ b/tests/tuple/cast_tuple.gw @@ -0,0 +1,2 @@ +Object o; +o $ <~int~>Tuple; diff --git a/tests/tuple/cast_tuple2.gw b/tests/tuple/cast_tuple2.gw new file mode 100644 index 00000000..050f959f --- /dev/null +++ b/tests/tuple/cast_tuple2.gw @@ -0,0 +1,3 @@ +class C { int i; } +C c; +c $ <~int~>Tuple;