-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Disallow cyclic unboxed types? #10485
Copy link
Copy link
Closed
Labels
Description
Hi!
The current testsuite suggests that we should allow types of the form
type t = A of t [@@unboxed]Even though it is acceptable, this type is inhabited by no OCaml runtime value (and hence equivalent to the empty type?).
However, accepting it poses problem further down the line in joint work with @gasche : it would needlessly over complicate our cycle detection algorithm (see #10479), which simply rejects the above type after detecting a cycle.
Is it acceptable to change the behavior and reject this kind of declaration, given than it is impossible to generate code that manipulates them?
Thanks!
Reactions are currently unavailable