ocaml-community / utop

Universal toplevel for OCaml
Other
847 stars 113 forks source link

utop mishandles floating-point unary negation #115

Open MarkJosephs opened 10 years ago

MarkJosephs commented 10 years ago

utop # -. 1;;

  • : int = -1

In contrast, ocaml underlines 1 and reports

Error: This expression has type int but an expression was expected of type float

whitequark commented 10 years ago

This is the fault of camlp4. Bare utop (without camlp4) exhibits same behavior as ocaml.