www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 3096] New: EnumBaseType


           Summary: EnumBaseType
           Product: D
           Version: 2.030
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Severity: trivial
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: tim.matthews7 gmail.com

from: http://digitalmars.com/d/2.0/enum.html

"If the EnumBaseType is not explicitly set, and the first EnumMember has an
initializer, it is set to the type of that initializer. Otherwise, it defaults
to type int."

module test;

enum LongEnum
    SomeLong = 2147772029 //initializer

void main()

test.d(5): Error: cannot implicitly convert expression (2147772029L) of type
long to int

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