Bug 21362 – Unclear specification of `in` parameter storage class
Status
RESOLVED
Resolution
FIXED
Severity
critical
Priority
P1
Component
dlang.org
Product
D
Version
D2
Platform
All
OS
All
Creation time
2020-11-03T23:21:38Z
Last change time
2021-10-25T05:19:08Z
Keywords
industry
Assigned to
No Owner
Creator
johanengelen
Comments
Comment #0 by johanengelen — 2020-11-03T23:21:38Z
At https://dlang.org/spec/function.html#param-storage it is unclear what the meaning of `in` is, because of the last sentence "This requires the -preview=in switch, available in v2.094.0 or higher." What does "This" refer to?
Please reformulate, for example by:
"The parameter is an input to the function. Input parameters behaves as if they have the const scope storage classes....
When `-preview=in` switch is passed to compiler, the semantics become:
The parameter is an input to the function. Input parameters behaves as if they have the const scope storage classes....
"
Comment #1 by pro.mathias.lang — 2021-10-25T05:19:08Z