[Issue 12094] New: typeof(null) should convert to reference types

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Feb 6 22:21:29 PST 2014


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

           Summary: typeof(null) should convert to reference types
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: yebblies at gmail.com
        ReportedBy: yebblies at gmail.com


--- Comment #0 from yebblies <yebblies at gmail.com> 2014-02-07 17:21:20 EST ---
void main()
{
    auto n = null;
    int *a;
    int[int] b;
    int[] c;
    auto u = true ? null : a;
    auto v = true ? null : b;
    auto w = true ? null : c;
    auto x = true ? n : a; // error
    auto y = true ? n : b; // error
    auto z = true ? n : c; // error
    a = n;
    b = n; // error
    c = n;
}

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