]> Nishi Git Mirror - gwion.git/commitdiff
:art: Improve similar types
authorfennecdjay <astor.jeremie@wanadoo.fr>
Sun, 13 Oct 2019 13:05:35 +0000 (15:05 +0200)
committerfennecdjay <astor.jeremie@wanadoo.fr>
Sun, 13 Oct 2019 13:05:35 +0000 (15:05 +0200)
src/parse/scan0.c

index 3431fbac9c032c7cf316782e0d7247ad3ec15589..a6b97d26f76fe714e543e008792fbdb3722fa0df 100644 (file)
@@ -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);
 }