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

           Summary: can't cast null to int
           Product: D
           Version: 1.047
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: patch, rejects-valid
          Severity: regression
          Priority: P2
         Component: DMD
        AssignedTo: nob...@puremagic.com
        ReportedBy: thecybersha...@gmail.com


--- Comment #0 from Vladimir <thecybersha...@gmail.com> 2009-12-17 13:41:18 PST 
---
Created an attachment (id=527)
Proposed patch

Testcase:

void main()
{
    int a = cast(int)null;
}

DMD 1.046 compiles fine.
DMD 1.047 outputs: 
test.d(3): Error: Integer constant expression expected instead of null
test.d(3): Error: Integer constant expression expected instead of null

Attaching proposed patch (needs review).

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

Reply via email to