Skip to content

Commit

Permalink
Semantics of readonly in mapping constructor
Browse files Browse the repository at this point in the history
Part of  #464
  • Loading branch information
jclark committed Mar 31, 2020
1 parent 80abb5e commit af7ed56
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions lang/spec.html
Original file line number Diff line number Diff line change
Expand Up @@ -3628,8 +3628,13 @@ <h3>Mapping constructor</h3>
order in which the computed-name-fields occur in the mapping-constructor-expr.
</p>
<p>
An mapping-constructor-expr occurring within a const-expr will construct a mapping value
that has its read-only bit on.
If the applicable contextually expected type is a subtype of readonly, then the
mapping will be constructed with its read-only bit on. If the inherent type
makes a specific field readonly, then that field will be constructed with its
read-only bit on. A specific-field that starts with <code>readonly</code> will
also be constructed with its read-only bit on. An mapping-constructor-expr
occurring within a const-expr will construct a mapping value that has its
read-only bit on.
</p>

</section>
Expand Down

0 comments on commit af7ed56

Please sign in to comment.