Bug 19964 – [Regression 2.066 - 2.067.1] nested pure functions variable access

Status
RESOLVED
Resolution
DUPLICATE
Severity
regression
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2019-06-14T10:47:08Z
Last change time
2019-06-14T11:28:43Z
Assigned to
No Owner
Creator
Nicholas Wilson

Comments

Comment #0 by iamthewilsonator — 2019-06-14T10:47:08Z
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.
Comment #1 by iamthewilsonator — 2019-06-14T11:28:43Z
*** This issue has been marked as a duplicate of issue 19963 ***