-
Notifications
You must be signed in to change notification settings - Fork 55
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
Allow record fields to be readonly #464
Comments
This is a little bit harder than it looks because the readonly-ness has to be part of the value (so it can be part of the shape). |
Still need explanation of semantics of |
Should infer precise rather than broad-type for field when it is read-only. |
As discussed in #469, if all the fields of a closed record type are immutable, then it should be considered immutable also. |
See this section of immutable proposal.
This is enough of #189 to be able to do tables #47.
Readonly fields cannot be assigned to after construction.
In this stage the type of a readonly field is restricted to be
readonly
as in issue #462 i.e. belong to inherently immutable basic type.Also should allow a mapping constructor to specify
readonly
before the field name.The text was updated successfully, but these errors were encountered: