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

           Summary: cast from dynamic array to ulong is allowed
           Product: D
           Version: 1.045
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Keywords: spec
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nob...@puremagic.com
        ReportedBy: kamm-removet...@incasoftware.de


This compiles and seems to set u to foo.length.

void main() {
    void[] foo = "abc";
    ulong u = cast(ulong)foo;
}

The cast is an error for any other numeric type. I think it ought to be an
error - if it is desired, it should at least be documented.

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

Reply via email to