www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 12908] New: [AA] `foreach` by keys and values over


          Issue ID: 12908
           Summary: [AA] `foreach` by keys and values over associative
                    array in pure function allow impure function calls
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Keywords: accepts-invalid
          Severity: normal
          Priority: P1
         Component: DMD
          Assignee: nobody puremagic.com
          Reporter: verylonglogin.reg gmail.com

This code should not compile:
void g() {}

void main() pure
    foreach(k, v; ["": ""])

Jun 13 2014