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

           Summary: Can't easily assign one Nullable to another
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: minor
          Priority: P2
         Component: Phobos
        AssignedTo: [email protected]
        ReportedBy: [email protected]


--- Comment #0 from Artem Tarasov <[email protected]> 2012-12-16 02:49:05 
PST ---
Example:

import std.typecons;

void main() {
    Nullable!int a, b;
    a = b; // what seems to happen is a.opAssign(b.get) => enforcement fails
}

The workaround is simple but ugly: if (b.isNull) a.nullify(); else a = b;

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

Reply via email to