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: [email protected]
Reporter: [email protected]
This code should not compile:
---
void g() {}
void main() pure
{
foreach(k, v; ["": ""])
g();
}
---
--
