https://issues.dlang.org/show_bug.cgi?id=17635

--- Comment #3 from Walter Bright <bugzi...@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.

--

Reply via email to