[Issue 7432] DMD allows variables to be declared as pure

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Aug 18 21:49:04 PDT 2013


http://d.puremagic.com/issues/show_bug.cgi?id=7432



--- Comment #14 from Maxim Fomin <maxim at maxim-fomin.ru> 2013-08-18 21:48:57 PDT ---
(In reply to comment #10)
> Yes, that was the essence of bug 3118.  It seems Walter wontfix'd it because he
> feels each attribute needs to be considered individually.
> 
> The only explanation of pure that I've managed to find in the specs relates to
> functions.
> http://dlang.org/function.html#pure-functions
> 
> In the absence of any explanation of what pure means applied to variables, I
> can only be assumed that pure cannot be applied to variables, and therefore any
> attempt to apply pure to a variable is supposed to fail with a compile error.

This is not a good way of reasoning.

Also, as described above there are cases like in attribute: or attribute {}
where ignoring storage class helps.

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


More information about the Digitalmars-d-bugs mailing list