utop icon indicating copy to clipboard operation
utop copied to clipboard

utop mishandles floating-point unary negation

Open MarkJosephs opened this issue 11 years ago • 1 comments

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

MarkJosephs avatar Nov 26 '14 17:11 MarkJosephs

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

whitequark avatar Nov 26 '14 17:11 whitequark