[Issue 17635] [REG 2.066.0] cannot convert unique immutable(int)** to immutable
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Oct 4 22:48:08 UTC 2017
https://issues.dlang.org/show_bug.cgi?id=17635
--- Comment #3 from Walter Bright <bugzilla at digitalmars.com> ---
I found one of the problems in getIndirection() in func.d:
extern (C++) Type getIndirection(Type t)
{
t = t.baseElemOf();
if (t.ty == Tarray || t.ty == Tpointer)
return t.nextOf().toBasetype();
if (t.ty == Taarray || t.ty == Tclass)
return t;
if (t.ty == Tstruct)
return t.hasPointers() ? t : null; // TODO
// should consider TypeDelegate?
return null;
}
https://github.com/dlang/dmd/blob/master/src/ddmd/func.d#L2459
The TODO means we're one level of indirection off, meaning all the rest of the
code that relies on getIndirection() is botched with structs, including
traverseIndirections(), which simply cannot work right with this error.
--
More information about the Digitalmars-d-bugs
mailing list