[Issue 9385] New: [Reresison 2.057] null literal should be implicitly convertible to bool

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Jan 24 05:27:34 PST 2013


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

           Summary: [Reresison 2.057] null literal should be implicitly
                    convertible to bool
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: rejects-valid
          Severity: regression
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: k.hara.pg at gmail.com


--- Comment #0 from Kenji Hara <k.hara.pg at gmail.com> 2013-01-24 05:27:32 PST ---
This code should work.

void main()
{
    assert((null ? true : false) == false);
    if (null) assert(0);
    assert(!null);
}

This regression is introduced from 2.057, by fixing issue 5416.

-- 
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