ocaml-community/utop

Redefining constructor () with an argument breaks everything

yannl35133 opened this issue · 1 comments

utop # type t = () of unit
Line 1, characters 0-19:
Warning 65 [redefining-unit]: This type declaration is defining a new '()' constructor
which shadows the existing one.
Hint: Did you mean 'type t = unit'?
type t = () of unit
utop # let a = 0;;
Error: The constructor () expects 1 argument(s),
       but is applied here to 0 argument(s)

As far as I can tell every subsequent command fails with the same error

Edit: it doesn't happen in the ocaml toplevel

We're building LIdent "()" in a couple of places. I'll try to fix that properly. Thanks for the bug report.