[Issue 15045] [Reg 2.069-devel] hasElaborateCopyConstructor is true for struct with opDispatch
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Sun Sep 13 22:20:12 PDT 2015
https://issues.dlang.org/show_bug.cgi?id=15045
--- Comment #2 from Kenji Hara <k.hara.pg at gmail.com> ---
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.
--
More information about the Digitalmars-d-bugs
mailing list