[Issue 10268] New: std.typecons.Nullable!JSONValue - error instantiating

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Jun 4 09:40:44 PDT 2013


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

           Summary: std.typecons.Nullable!JSONValue - error instantiating
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: nobody at puremagic.com
        ReportedBy: kroeplin.d at googlemail.com


--- Comment #0 from Mario Kroeplin <kroeplin.d at googlemail.com> 2013-06-04 09:40:43 PDT ---
With D 2.063 the follwing code no longer compiles:

import std.json;
import std.typecons;

void main()
{
    JSONValue value = void;

    value.type = JSON_TYPE.NULL;
    Nullable!JSONValue(value);
}

phobos/std/typecons.d(1178): Error: cannot implicitly convert expression
(value) of type JSONValue to inout(JSONValue)
test.d(9): Error: template instance
std.typecons.Nullable!(JSONValue).Nullable.__ctor!() error instantiating

Without the recently added 'inout' in 'this()(T value) inout' of 'struct
Nullable(T)' it used to work.

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