Skip to content

Commit a25e3b5

Browse files
committed
Fix 4.06 warning/error
1 parent 1b594f9 commit a25e3b5

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

jscomp/bsb_helper/bsb_arg.ml

+9-7
Original file line numberDiff line numberDiff line change
@@ -111,17 +111,19 @@ let parse_exn (speclist : t) anonfun errmsg =
111111
incr current;
112112
| Int f when !current + 1 < l ->
113113
let arg = argv.(!current + 1) in
114-
begin try f (int_of_string arg)
115-
with Failure "int_of_string" ->
116-
raise (Stop (Wrong (s, arg, "an integer")))
114+
begin match int_of_string arg with
115+
| i -> f i
116+
| exception _
117+
->
118+
raise (Stop (Wrong (s, arg, "an integer")))
117119
end;
118120
incr current;
119121
| Set_int r when !current + 1 < l ->
120122
let arg = argv.(!current + 1) in
121-
begin try r := (int_of_string arg)
122-
with Failure "int_of_string" ->
123-
raise (Stop (Wrong (s, arg, "an integer")))
124-
end;
123+
r := (try int_of_string arg
124+
with _ ->
125+
raise (Stop (Wrong (s, arg, "an integer")))
126+
);
125127
incr current;
126128
| _ -> raise (Stop (Missing s))
127129
in

jscomp/core/js_implementation.ml

+1-1
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ let interface_mliast ppf fname outputprefix =
9999

100100
let get_lambda = fun
101101
#if OCAML_VERSION =~ ">4.03.0" then
102-
{code = lambda}
102+
{Lambda.code = lambda}
103103
#else
104104
lambda
105105
#end -> lambda

0 commit comments

Comments
 (0)