[Issue 13979] New: ForeachType grammar does not allow 'ref' to appear after type constructors
    via Digitalmars-d-bugs 
    digitalmars-d-bugs at puremagic.com
       
    Tue Jan 13 16:35:30 PST 2015
    
    
  
https://issues.dlang.org/show_bug.cgi?id=13979
          Issue ID: 13979
           Summary: ForeachType grammar does not allow 'ref' to appear
                    after type constructors
           Product: D
           Version: D2
          Hardware: All
               URL: http://dlang.org/grammar.html#ForeachType
                OS: All
            Status: NEW
          Keywords: spec
          Severity: normal
          Priority: P1
         Component: websites
          Assignee: nobody at puremagic.com
          Reporter: briancschott at gmail.com
            Blocks: 10233
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.
--
    
    
More information about the Digitalmars-d-bugs
mailing list