https://issues.dlang.org/show_bug.cgi?id=19963
Issue ID: 19963
Summary: [Regression 2.066 - 2.067.1] nested pure functions
variable access
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: regression
Priority: P1
Component: dmd
Assignee: [email protected]
Reporter: [email protected]
>From the source code of DMD no less!
void f() {
int fx;
pure void g() {
int gx;
/+pure+/ void h() {
int hx;
/+pure+/ void i() { fx = 0; }
}
}
}
should give
Error: pure nested function 'g' cannot access mutable data 'fx'
if the commented out `purees are removed it should give
Error: pure nested function 'i' cannot access mutable data 'fx'
three times.
--