[Issue 4090] No foreach type inference with const, ref etc modifiers

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Jul 1 18:44:16 PDT 2012


http://d.puremagic.com/issues/show_bug.cgi?id=4090


Kenji Hara <k.hara.pg at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |spec
           Platform|x86                         |All
         OS/Version|Windows                     |All
           Severity|normal                      |enhancement


--- Comment #3 from Kenji Hara <k.hara.pg at gmail.com> 2012-07-01 18:46:53 PDT ---
https://github.com/D-Programming-Language/dmd/pull/1033

This is not supported by the current spec, so it is an enhancement..

http://dlang.org/statement#ForeachStatement
> ForeachStatement:
>  Foreach (ForeachTypeList ; Aggregate) NoScopeNonEmptyStatement
> 
> Foreach:
>  foreach
>  foreach_reverse
> 
> ForeachTypeList:
>  ForeachType
>  ForeachType , ForeachTypeList
> 
> ForeachType:
>   ref(opt) BasicType Declarator
>   ref(opt) Identifier

ForeachType can have only 'ref' as a storage class.
Others, 'const', 'immutable', 'shared', and 'inout' are disallowed by the
grammar.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list