[Issue 17623] Unexpected failure of an assertion on empty strings
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Jul 15 20:57:24 UTC 2022
https://issues.dlang.org/show_bug.cgi?id=17623
kdevel <kdevel at vogtner.de> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
Resolution|INVALID |---
--- Comment #4 from kdevel <kdevel at vogtner.de> ---
(In reply to RazvanN from comment #3)
> The documentation is not wrong.
That is an untrue statement. The documentation /is/ wrong [1]. Both s and t in
string s = null;
string t = "";
refer to the same elements and have the same number of elements. The
documentation must be corrected. A possible replacement for the original
statement
For static and dynamic arrays, identity is defined as referring to
the same array elements and the same number of elements.
is
For static and dynamic arrays, identity of two arrays is given when
both arrays refer to the same memory location and contain the same number
of elements.
[1] http://forum.dlang.org/post/lincnykmotjlpygvpfsm@forum.dlang.org
--
More information about the Digitalmars-d-bugs
mailing list