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

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Mon Aug 15 16:05:03 PDT 2016


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

ag0aep6g at gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ag0aep6g at gmail.com

--- Comment #7 from ag0aep6g at gmail.com ---
(In reply to Steven Schveighoffer from comment #6)
> I mean it's a doc issue in that the documentation doesn't reflect what
> initializer() actually does (and has always done).

I.e., it's a long-standing bug.

> There isn't much to say
> except that I don't think we can change the behavior at this point without
> breaking things.

Pretty much every bug fix can be considered a breaking change. I don't think we
need to live with this, just because someone may be relying on behavior that's
clearly going against documentation.

> It's been this way since 2009, so most people don't use it or care about it,
> or they would have hit this issue before.

If they don't use it, their code won't get broken by the fix.

> I realize we can't get your time
> back looking for this issue, but I think at this point, the best thing to do
> is fix the docs and fix any code that was done using this incorrect
> assumption.

I disagree. I think fixing the code to behave as documented is the way to go.

--


More information about the Digitalmars-d-bugs mailing list