[Issue 3096] New: EnumBaseType

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Jun 26 21:43:54 PDT 2009


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

           Summary: EnumBaseType
           Product: D
           Version: 2.030
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Severity: trivial
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: tim.matthews7 at 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: -------


More information about the Digitalmars-d-bugs mailing list