Bug 12908 – [AA] `foreach` by keys and values over associative array in pure function allow impure function calls

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2014-06-13T08:15:00Z
Last change time
2015-02-18T03:37:36Z
Keywords
accepts-invalid
Assigned to
nobody
Creator
verylonglogin.reg

Comments

Comment #0 by verylonglogin.reg — 2014-06-13T08:15:12Z
This code should not compile: --- void g() {} void main() pure { foreach(k, v; ["": ""]) g(); } ---
Comment #1 by k.hara.pg — 2014-06-14T13:05:55Z
*** This issue has been marked as a duplicate of issue 9148 ***
Comment #2 by github-bugzilla — 2014-11-13T10:59:28Z
Commit pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/2774054ce2a3fb03a27f5495c4b7acb9b9bece74 fix Issue 12908 - [AA] `foreach` by keys and values over associative array in pure function allow impure function calls
Comment #3 by github-bugzilla — 2015-02-18T03:37:36Z
Commit pushed to 2.067 at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/2774054ce2a3fb03a27f5495c4b7acb9b9bece74 fix Issue 12908 - [AA] `foreach` by keys and values over associative array in pure function allow impure function calls