[Issue 16394] TypeInfo.init() for static arrays returns single element instead of whole array

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Tue Aug 16 05:58:20 PDT 2016


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

--- Comment #13 from Steven Schveighoffer <schveiguy at yahoo.com> ---
changing the compiler when the existing code works JUST FINE as long as it's
properly understood and documented seems like a horrible idea to me.

It would be a different story if it was not possible to properly initialize a
static array using the TypeInfo.

The current code also returns an array that is null, but with a non-zero length
when the initializer would otherwise be all zeros to save on binary space.
That's a weird behavior, but somehow we live just fine with that. I don't see
why we can't document the other weird, yet legitimate, behavior.

--


More information about the Digitalmars-d-bugs mailing list