digitalmars.D.bugs - [Issue 19964] New: [Regression 2.066 - 2.067.1] nested pure
- d-bugmail puremagic.com (30/31) Jun 14 2019 https://issues.dlang.org/show_bug.cgi?id=19964
https://issues.dlang.org/show_bug.cgi?id=19964 Issue ID: 19964 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: nobody puremagic.com Reporter: iamthewilsonator hotmail.comFrom 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. --
Jun 14 2019