www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 4049] New: enum constant with no initializer

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=4049

           Summary: enum constant with no initializer
           Product: D
           Version: future
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: rejects-valid
          Severity: enhancement
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: bearophile_hugs eml.cc



This program correctly gives an error message, but I don't see why this code is
wrong, here f can be just f.init:


struct Foo {}
enum Foo f;
void main() {}


dmd 2.042 gives:

test.d(2): Error: variable test.f manifest constants must have initializers

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Apr 02 2010
parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=4049


bearophile_hugs eml.cc changed:

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



People seem to not like this idea, saying this is usually a bug, so I close it.

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