Skip to content

Commit f125fdd

Browse files
committed
make sure it is int32
1 parent 445a780 commit f125fdd

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

compiler/core/js_exp_make.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1623,7 +1623,7 @@ let int32_pow ?comment (e1 : t) (e2 : t) : J.expression =
16231623
match (e1.expression_desc, e2.expression_desc) with
16241624
| Number (Int {i = i1}), Number (Int {i = i2}) ->
16251625
to_int32 (int ?comment (Ext_int.int32_pow i1 i2))
1626-
| _ -> {comment; expression_desc = Bin (Pow, e1, e2)}
1626+
| _ -> to_int32 (float_pow ?comment e1 e2)
16271627

16281628
let rec int32_bxor ?comment (e1 : t) (e2 : t) : J.expression =
16291629
match (e1.expression_desc, e2.expression_desc) with

tests/tests/src/test_pervasive.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ function a17(prim) {
186186
}
187187

188188
function a18(prim0, prim1) {
189-
return prim0 ** prim1;
189+
return prim0 ** prim1 | 0;
190190
}
191191

192192
let f = Pervasives.$at;

0 commit comments

Comments
 (0)