Skip to content

Commit

Permalink
make sure it is int32
Browse files Browse the repository at this point in the history
  • Loading branch information
cometkim committed Nov 9, 2024
1 parent 8af675c commit 503602b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion compiler/core/js_exp_make.ml
Original file line number Diff line number Diff line change
Expand Up @@ -1609,7 +1609,7 @@ let int32_pow ?comment (e1 : t) (e2 : t) : J.expression =
match (e1.expression_desc, e2.expression_desc) with
| Number (Int {i = i1}), Number (Int {i = i2}) ->
to_int32 (int ?comment (Ext_int.int32_pow i1 i2))
| _ -> {comment; expression_desc = Bin (Pow, e1, e2)}
| _ -> to_int32 (float_pow ?comment e1 e2)

let rec int32_bxor ?comment (e1 : t) (e2 : t) : J.expression =
match (e1.expression_desc, e2.expression_desc) with
Expand Down
2 changes: 1 addition & 1 deletion tests/tests/src/test_pervasive.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ function a17(prim) {
}

function a18(prim0, prim1) {
return prim0 ** prim1;
return prim0 ** prim1 | 0;
}

let f = Pervasives.$at;
Expand Down

0 comments on commit 503602b

Please sign in to comment.