File tree 2 files changed +19
-0
lines changed
tests/unit/src/unit/issues
2 files changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -630,6 +630,10 @@ let type_non_assign_op ctx op e1 e2 is_assign_op abstract_overload_only with_typ
630
630
WithType. value
631
631
in
632
632
let e1 = type_expr ctx e1 wt in
633
+ let e1 = match wt with
634
+ | WithType. WithType (t ,_ ) -> AbstractCast. cast_or_unify ctx t e1 e1.epos
635
+ | _ -> e1
636
+ in
633
637
let result = if abstract_overload_only then begin
634
638
let e2 = type_binop_rhs ctx op e1 e2 is_assign_op with_type p in
635
639
try_abstract_binop_overloads ctx op e1 e2 is_assign_op p
Original file line number Diff line number Diff line change
1
+ package unit .issues ;
2
+
3
+ import haxe .EnumFlags ;
4
+
5
+ private enum E {
6
+ A ;
7
+ B ;
8
+ }
9
+
10
+ class Issue10981 extends Test {
11
+ function test () {
12
+ var flags : EnumFlags <E > = A | B ;
13
+ eq (3 , flags .toInt ());
14
+ }
15
+ }
You can’t perform that action at this time.
0 commit comments