[Issue 11976] New: Regression 2.065.b1: cannot implicitly convert expression of type ulong to int

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Jan 23 05:06:47 PST 2014


https://d.puremagic.com/issues/show_bug.cgi?id=11976

           Summary: Regression 2.065.b1: cannot implicitly convert
                    expression of type ulong to int
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: regression
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: doob at me.com


--- Comment #0 from Jacob Carlborg <doob at me.com> 2014-01-23 05:06:42 PST ---
This compiled in DMD 2.064.2:

enum socket_t: int
{
    init  = -1
}

void main()
{
    size_t nfdbits;
    socket_t s;
    int index = cast(uint)s % nfdbits;
}

Compiling with DMD 2.065.b1 I get this error:

Error: cannot implicitly convert expression (cast(ulong)cast(uint)s % nfdbits)
of type ulong to int.

I'm suspecting this shouldn't have compiled at all. But I just want to make
sure.

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


More information about the Digitalmars-d-bugs mailing list