Skip to content

Commit e039c7c

Browse files
committed
non polymorphic
1 parent c081236 commit e039c7c

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

jscomp/ext/ext_pervasives.ml

+3
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@ let with_file_as_chan filename f =
4646
let max_int (x : int) y =
4747
if x >= y then x else y
4848

49+
let min_int (x : int) y =
50+
if x < y then x else y
51+
4952
let max_int_option (x : int option) y =
5053
match x, y with
5154
| None, _ -> y

jscomp/ext/ext_pervasives.mli

+1-3
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,9 @@ val finally :
4444
val with_file_as_chan : string -> (out_channel -> 'a) -> 'a
4545

4646

47-
48-
49-
5047
val max_int : int -> int -> int
5148

49+
val min_int : int -> int -> int
5250
val max_int_option :
5351
int option ->
5452
int option ->

jscomp/ml/ctype.ml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2648,7 +2648,7 @@ and unify_row env row1 row2 =
26482648
let more =
26492649
if fixed1 then rm1 else
26502650
if fixed2 then rm2 else
2651-
newty2 (min rm1.level rm2.level) (Tvar None) in
2651+
newty2 (Ext_pervasives.min_int rm1.level rm2.level) (Tvar None) in
26522652
let fixed = fixed1 || fixed2
26532653
and closed = row1.row_closed || row2.row_closed in
26542654
let keep switch =

0 commit comments

Comments
 (0)