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

--- Comment #2 from Kenji Hara <[email protected]> ---
IMHO, it would be better to prevent forwarding some built-in special member
names prefixed by double-underscore through alias this or opDispatch.

As we've already patched in library code like,

 https://github.com/D-Programming-Language/druntime/pull/1313

forwarding of __xpostblit and __xdtor are hardly useless.

>From the dmd internal view, 
the complete list of "no forward" members would be:

__ctor (Id.ctor)
__dtor (Id.dtor)
__xdtor (Id.__xdtor)
__postblit (Id.postblit)
__xpostblit (Id.__xpostblit)

Following double-underscore member names are invisible with "something.name"
syntax, so they don't need to be considered.

__fieldDtor (Id.__fieldDtor)
__aggrDtor (Id.__aggrDtor)
__fieldPostblit (Id.__fieldPostblit)
__aggrPostblit (Id.__aggrPostblit)
__invariant (Id.classInvariant)
__xopEquals (Id.xopEquals)
__xopCmp (Id.xopCmp)
__xtoHash (Id.xtoHash)

If we kill the forwarding for the specific names, we can just modify
Type.noMember function behavior.

--

Reply via email to