From: fennecdjay Date: Sun, 13 Oct 2019 13:05:35 +0000 (+0200) Subject: :art: Improve similar types X-Git-Tag: nightly~2157 X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=ab709ca25020424881d8f3129627730c557bb913;p=gwion.git :art: Improve similar types --- diff --git a/src/parse/scan0.c b/src/parse/scan0.c index 3431fbac..a6b97d26 100644 --- a/src/parse/scan0.c +++ b/src/parse/scan0.c @@ -124,15 +124,12 @@ static OP_CHECK(opck_cast_similar) { } ANN static void scan0_implicit_similar(const Env env, const Type lhs, const Type rhs) { - struct Op_Import opi = { .op=insert_symbol("@implicit"), .lhs=lhs, .rhs=rhs, .ck=opck_implicit_similar }; - add_op(env->gwion, &opi); - opi.op=insert_symbol("$"); - opi.ck = opck_cast_similar; + struct Op_Import opi = { .op=insert_symbol("$"), .lhs=lhs, .rhs=rhs, .ck=opck_cast_similar }; add_op(env->gwion, &opi); opi.lhs=rhs; opi.rhs=lhs; add_op(env->gwion, &opi); - opi.ck = opck_usr_implicit; + opi.ck = opck_implicit_similar; opi.op=insert_symbol("@implicit"); add_op(env->gwion, &opi); }