I think this is also related to
  http://caml.inria.fr/mantis/view.php?id=6070

Note that enabling warning 27 (non-suspicious unused variables) also solves this issue:

 % ocaml -w +27
        OCaml version 4.00.1

# let foo ~x ~x () = x;;
Warning 27: unused variable x.
val foo : x:'a -> x:'b -> unit -> 'b = <fun>



On Tue, Sep 17, 2013 at 2:55 PM, Török Edwin <edwin+ml-ocaml@etorok.net> wrote:
Hi,

The following is accepted:

let foo ~x ~x () = ()
let () =
  foo ~x:4 ~x:5 ()

I tried -w A and I got no warnings with OCaml 4.01.0, is this intended?
Should I file a feature request to get a warning for this situation?

(How I got in this situation: I did an overly eager search/replace that caused the duplicate ~x)

Best regards,
--Edwin

--
Caml-list mailing list.  Subscription management and archives:
https://sympa.inria.fr/sympa/arc/caml-list
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs