[Issue 7510] implicit conversion to immutable fails for pure delegates and function pointers

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Nov 27 08:14:32 PST 2013


https://d.puremagic.com/issues/show_bug.cgi?id=7510


timon.gehr at gmx.ch changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|INVALID                     |


--- Comment #2 from timon.gehr at gmx.ch 2013-11-27 08:14:30 PST ---
(In reply to comment #1)
> As delegates/nested functions, they are not strongly pure and can access
> mutable data in the enclosing function.

No, they can't because they don't.

> It works if they are made static.

That implies that this request is _valid_, not the opposite. Function literals
have attributes inferred. The first step for making this pass is to even allow
the 'immutable' attribute on strongly pure delegate literals.

Note that the way purity is handled for delegate literals by DMD is wrong,
since it has not been updated after the meaning of 'pure' was updated.

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list