You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Original bug ID: 3887 Reporter: berke Status: closed (set by @garrigue on 2005-11-28T09:48:09Z) Resolution: not a bug Priority: normal Severity: minor Version: 3.09.0 Category: ~DO NOT USE (was: OCaml general)
Bug description
By mistake, I noticed that Ocaml accepts a type definition like
type t = ()
(instead of type t = unit) and behaves strangely after that, e.g.,
% ledit ocaml
Objective Caml version 3.09
type t = ();;
type t = ()
let x : unit = ();;
This expression has type t but is here used with type unit
The text was updated successfully, but these errors were encountered:
This is expected behaviour. "()" is a valid data constructor and of type "unit" by default. You have just defined this constructor to be of a different type, which explains the error message.
Original bug ID: 3887
Reporter: berke
Status: closed (set by @garrigue on 2005-11-28T09:48:09Z)
Resolution: not a bug
Priority: normal
Severity: minor
Version: 3.09.0
Category: ~DO NOT USE (was: OCaml general)
Bug description
By mistake, I noticed that Ocaml accepts a type definition like
type t = ()
(instead of type t = unit) and behaves strangely after that, e.g.,
% ledit ocaml
Objective Caml version 3.09
type t = ();;
type t = ()
let x : unit = ();;
This expression has type t but is here used with type unit
The text was updated successfully, but these errors were encountered: