The current spec says:
Within a parenthesized const declaration list the expression list may be omitted from any but the first ConstSpec. Such an empty list is equivalent to the textual substitution of the first preceding non-empty expression list and its type if any. Omitting the list of expressions is therefore equivalent to repeating the previous list.
By the explanation, the following two declarations are equivalent but are not actually (assume they are in local blocks):
const (
A = iota
iota = iota
B
C
)
const (
A = iota
iota = iota
B = iota
C
)
It would be better to change "textual" into "lexical".
The current spec says:
By the explanation, the following two declarations are equivalent but are not actually (assume they are in local blocks):
It would be better to change "textual" into "lexical".