[records] Is C-style array declaration in components dropped?
gavin.bierman at oracle.com
Fri Sep 18 13:47:36 UTC 2020
[Just tidying up the next version of the spec…and going through my list of outstanding emails.]
> On 24 Jul 2020, at 05:06, Tagir Valeev <amaembo at gmail.com> wrote:
> Btw if this change is intended, then it looks like the changes in
> section 10.2  must be dropped as well
> The array type of a variable depends on the bracket pairs that may
> appear as part of the type at the beginning of a variable declaration,
> or as part of the declarator for the variable, or both. Specifically,
> in the declaration of a field, formal parameter, local variable, or
> record component (8.3, 8.4.1, 9.3, 9.4, 14.4.1, 14.14.2, 15.27.1,
> 8.10.1), the array type of the variable is denoted by <...>
> Now, this text is inconsistent with 8.10.1.
Actually it isn’t inconsistent as we need this text to allow for variable arity record component declarations. What is needed is to keep this as it is, but additionally to amend the three bullet points that follow to:
- the element type that appears at the beginning of the declaration; then,
- any bracket pairs that follow the variable's Identifier in the declarator
(not applicable for a variable arity parameter **or variable arity record
- any bracket pairs that appear in the type at the beginning of the
declaration (where the ellipsis of a variable arity parameter **or variable
arity record component** is treated as a bracket pair).
(Text marked **…** is new).
More information about the amber-spec-experts