[Issue 10643] Refused const array struct field initialized with void

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Jul 14 19:38:16 PDT 2013


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


Maxim Fomin <maxim at maxim-fomin.ru> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |maxim at maxim-fomin.ru


--- Comment #1 from Maxim Fomin <maxim at maxim-fomin.ru> 2013-07-14 19:38:14 PDT ---
>From http://dlang.org/changelog.html#staticfields : "Eventually, they will be
deprecated, and then will trigger an error."

The issue is that void initializer does not disable initialization but fills
aggregate member with zero (it also fills data with zeros for types which .init
property is not zero). If you replace void with some number, the code would not
still compile, so this is not a specific to void. Also this fails in accordance
with change-log. 

I think this can be change to request to make void behavior to what it does for
local variables or request to update the spec, but in current circumstances
this issue is resolved-invalid.

-- 
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