digitalmars.D.bugs - [Issue 12908] New: [AA] `foreach` by keys and values over
- via Digitalmars-d-bugs (25/25) Jun 13 2014 https://issues.dlang.org/show_bug.cgi?id=12908
https://issues.dlang.org/show_bug.cgi?id=12908 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; ["": ""]) g(); } --- --
Jun 13 2014