]> Nishi Git Mirror - gwion.git/commitdiff
:art: Add cast for similar types
authorfennecdjay <astor.jeremie@wanadoo.fr>
Wed, 25 Sep 2019 20:40:16 +0000 (22:40 +0200)
committerfennecdjay <astor.jeremie@wanadoo.fr>
Wed, 25 Sep 2019 20:40:16 +0000 (22:40 +0200)
src/parse/scan0.c

index efd329b202569997aec6e7f701ff360452abbf7a..eba8f72a35de8cb7df66584402c7c3623743ae88 100644 (file)
@@ -101,6 +101,8 @@ static OP_CHECK(opck_implicit_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("@cast");
+  add_op(env->gwion, &opi);
 }
 
 ANN static void typedef_simple(const Env env, const Type_Def tdef, const Type base) {