[Issue 4967] { } struct literals not documented, and not working

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Oct 1 07:38:15 PDT 2010


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


Don <clugdbug at yahoo.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |clugdbug at yahoo.com.au
            Version|D1                          |D1 & D2


--- Comment #3 from Don <clugdbug at yahoo.com.au> 2010-10-01 07:37:57 PDT ---
(In reply to comment #1)
> They're deprecated in D2.

I hope that will happen, but so far it hasn't. They are still in the spec.

> I think D1 has them documented.
> Maybe should mark this as INVALID.

They are documented in D2, in struct.html. It says:

"The static initializer syntax can also be used to initialize non-static
variables, provided that the member names are not given. The initializer need
not be evaluatable at compile time."

But in DMD, ever since CTFE was introduced, it must be evaluatable at compile
time. The implementation is also full of bugs. For example, see bug 3271.

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