Bug 13979 – ForeachType grammar does not allow 'ref' to appear after type constructors

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
dlang.org
Product
D
Version
D2
Platform
All
OS
All
Creation time
2015-01-14T00:35:00Z
Last change time
2015-01-18T07:59:29Z
Keywords
pull, spec
Assigned to
nobody
Creator
briancschott
Blocks
10233

Comments

Comment #0 by briancschott — 2015-01-14T00:35:30Z
Example DMD-valid code rejected by language spec: --- foreach (foo, const ref bar; qwer.tyuiop) --- The grammar spec says this: ForeachType: 'ref'? TypeCtors? BasicType Declarator 'ref'? TypeCtors? Identifier Either the compiler should be changed to require that 'ref' appear first, or the grammar should be corrected to allow 'ref' to appear after type constructors.
Comment #1 by briancschott — 2015-01-16T20:16:18Z
Comment #2 by github-bugzilla — 2015-01-18T07:59:22Z
Commits pushed to master at https://github.com/D-Programming-Language/dlang.org https://github.com/D-Programming-Language/dlang.org/commit/ccd33d814f34492cec6e8a4efe0ba38e01cbeef5 Issue 13979 - ForeachType grammar does not allow 'ref' to appear after type constructors https://github.com/D-Programming-Language/dlang.org/commit/adf4faffa10193fef69f9b472d72c21f533afb18 Merge pull request #773 from Hackerpilot/issue-13979 Issue 13979 - ForeachType grammar does not allow 'ref' to appear after t...