[Issue 14218] New: casting null to integer type causes error message

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Mon Feb 23 10:50:31 PST 2015


https://issues.dlang.org/show_bug.cgi?id=14218

          Issue ID: 14218
           Summary: casting null to integer type causes error message
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: regression
          Priority: P1
         Component: DMD
          Assignee: nobody at puremagic.com
          Reporter: r.sagitario at gmx.de

With dmd-2067-beta2:

void main()
{
    auto sz = cast(long)null;
}

test.d(5): Error: e2ir: cannot cast null of type typeof(null) to type long

Any cast of null to an integer type seems to fail, but works in 2.066.

--


More information about the Digitalmars-d-bugs mailing list