closes #5599
@@ -1001,7 +1001,7 @@ and type_binop2 ctx op (e1 : texpr) (e2 : Ast.expr) is_assign_op wt p =
| [] ->
raise Not_found
in
- loop (if left then a.a_ops else List.filter (fun (_,cf) -> not (Meta.has Meta.Impl cf.cf_meta)) a.a_ops)
+ loop a.a_ops
try
begin match follow e1.etype with
@@ -0,0 +1,16 @@
+package unit.issues;
+
+private abstract I(Int) from Int to Int {
+ @:op(A==B)
+ @:commutative
+ public function eqString(s:String):Bool
+ return Std.string(this) == s;
+}
+class Issue5599 extends unit.Test {
+ function test() {
+ var i:I = 1;
+ t(i == '1');
+ t('1' == i);
+ }