[Issue 19963] [Regression 2.066 - 2.067.1] nested pure functions variable access

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Feb 13 11:01:26 UTC 2020


https://issues.dlang.org/show_bug.cgi?id=19963

RazvanN <razvan.nitu1305 at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |razvan.nitu1305 at gmail.com

--- Comment #3 from RazvanN <razvan.nitu1305 at gmail.com> ---
The problem is that function g is pure, but it contains function i that
accesses the variable fx which is outside of its scope, thus violating purity.
This code should issue an error, but it doesn't.

--


More information about the Digitalmars-d-bugs mailing list