[Issue 20316] array properties fail hasMember

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Dec 12 10:20:40 UTC 2019


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

Walter Bright <bugzilla at digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |WONTFIX

--- Comment #6 from Walter Bright <bugzilla at digitalmars.com> ---
> traits(hasMember) on a works properly.

Meaning:

int[] array;
pragma(msg, __traits(hasMember, array, "length"));   // true
pragma(msg, __traits(hasMember, array, "ptr"));      // true
pragma(msg, __traits(hasMember, array, "capacity")); // true
pragma(msg, __traits(hasMember, array, "sizeof"));   // true
pragma(msg, __traits(hasMember, array, "alignof"));  // true

Gaahhh. It's probably far too late to change this behavior now.

Marking as WONTFIX.

--


More information about the Digitalmars-d-bugs mailing list