New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mutable fields and interfaces #3520
Comments
Comment author: administrator Salut Jean-Christophe,
A mon avis ca rentre dans la categorie "bug request"...
Il a bien raison, le compilo: si on l'accepte ca permet de creer une
La c'est plus facile: si le type t est "private" alors tu ne peux pas faire -- Damien |
Comment author: administrator Salut,
Je n'avais pas vu ce problème potentiel...
Je ne comprends pas en quoi le caractère "private" aiderait, car je -- |
Comment author: administrator From: Jean-Christophe.Filliatre@lri.fr
Oui, mais la value restriction garantit que le resultat de cette Reste que ca veut dire que l'interface ment sur la semantique, Jacques |
Comment author: administrator
Ce n'est pas absurde, mais il est toujours dangereux de ``mentir sur La sémantique ``menteuse'' des interfaces invaliderait donc la CSE et Ce ``raffinement'' n'est donc pas anodin et peut-être même pas Pierre |
@garrigue I wonder if we might be able to close this old issue? |
This issue has been open one year with no activity. Consequently, it is being marked with the "stale" label. What this means is that the issue will be automatically closed in 30 days unless more comments are added or the "stale" label is removed. Comments that provide new information on the issue are especially welcome: is it still reproducible? did it appear in other contexts? how critical is it? etc. |
Original bug ID: 3520
Reporter: administrator
Status: acknowledged
Resolution: open
Priority: normal
Severity: feature
Category: typing
Bug description
Dear ocaml developpers,
I don't know whether it is a bug report or a feature request.
I would like not to include the "mutable" modifier of a record field
in an interface, as in
module Foo : sig
type t = { a : int; b : int }
end = struct
type t = { a : int; mutable b : int }
end
but this is currently rejected by the ocaml compiler.
Note: I would like to do it also when the type t is "private" in the
interface.
Best regards,
Jean-Christophe
The text was updated successfully, but these errors were encountered: