diff --git a/js_of_ast.ml b/js_of_ast.ml index ae2a39c..b28fc0f 100644 --- a/js_of_ast.ml +++ b/js_of_ast.ml @@ -123,8 +123,9 @@ let is_infix f args = match args with let open Lexing in if f.exp_loc.loc_ghost then false else if x.exp_loc.loc_ghost then false else - x.exp_loc.loc_end.pos_lnum < f.exp_loc.loc_start.pos_lnum || - x.exp_loc.loc_end.pos_cnum < f.exp_loc.loc_start.pos_cnum + x.exp_loc.loc_start.pos_lnum < f.exp_loc.loc_start.pos_lnum || + (x.exp_loc.loc_start.pos_lnum = f.exp_loc.loc_start.pos_lnum && + x.exp_loc.loc_start.pos_cnum < f.exp_loc.loc_start.pos_cnum) exception Map_fields_elements_mismatch_number_args diff --git a/tests/arith.ml b/tests/arith.ml index d5ee32b..0e62112 100644 --- a/tests/arith.ml +++ b/tests/arith.ml @@ -1 +1,3 @@ let myadd x y = x +. y + +let subst x = x-1