Bug 10313 – inout constructor + IFTI + has indirections arg doesn't work
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-06-08T23:21:00Z
Last change time
2013-12-02T07:49:49Z
Keywords
pull, rejects-valid
Assigned to
nobody
Creator
k.hara.pg
Comments
Comment #0 by k.hara.pg — 2013-06-08T23:21:13Z
This code should work, but doesn't.
Test case:
struct JSONValue
{
JSONValue[] array;
}
struct Nullable(T)
{
this()(inout T value) inout {}
//this(U:T)(inout U value) inout {} // workaround
}
void main()
{
JSONValue value = void;
auto na = Nullable!JSONValue(value);
}