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

David Nadlinger <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]

--- Comment #5 from David Nadlinger <[email protected]> ---
After a quick glance, I'm not sure whether this is indeed what is at fault
here. If it was indeed getIndirection() that was at fault, shouldn't it then
also be used to decompose aggregate members in traverseIndirections? In other
words, wouldn't returning struct { T** } (or struct{ struct { T** } }, etc.)
instead of T** still falsely trip.

If I were to guess, I would say that traverseIndirections() is missing a
condition that returns false if the constness of the outermost layers is not
compatible instead of continuing to decompose the pointer types. That is, T*
and const(T*) should be regarded as a definite non-match, irrespective of what
T is. It seems like the previous `ta->immutableOf()->equals(tb->immutableOf())`
check did that, but with false positives.

--

Reply via email to