[Issue 13894] tupleof does not exclude hidden members

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Sat Dec 27 23:24:02 PST 2014


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

--- Comment #1 from Kenji Hara <k.hara.pg at gmail.com> ---
> > The .tupleof property returns an ExpressionTuple of all the fields in the class, excluding the hidden fields and the fields in the base class.

The spec is in the section "Class Properties", so in the strict sense, it would
not affect the semantics of struct tupleof property.

>From the view of implementation side, the inconsistency was introduced by
fixing issue 1418. By the fix class tupleof was changed not listing hidden
field but struct tupleof was not changed.

>From the user side, S.tupleof[$-1] is sometimes used to actually handle the
hidden context pointer.

Therefore, modifying tupleof behavior may affect not small code.

--


More information about the Digitalmars-d-bugs mailing list