ocaml-flambda / flambda-backend

The Flambda backend project for OCaml
94 stars 70 forks source link

Remove variables from computed signature for `with module` constriants. #2764

Closed ccasin closed 2 weeks ago

ccasin commented 2 weeks ago

This fixes a bug where zero_alloc and modality variables could sneak into value descriptions in signatures in a disallowed way via with module constraints. See the test for an example. These computed signatures are very much like module type of signatures, so we just take the same approach.

There are two commits: The first adds the test and shows it fails. The second fixes it.