[Issue 12404] Zip.back is wrong

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Mar 19 16:23:53 PDT 2014


https://d.puremagic.com/issues/show_bug.cgi?id=12404


Peter Alexander <peter.alexander.au at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |peter.alexander.au at gmail.co
                   |                            |m


--- Comment #1 from Peter Alexander <peter.alexander.au at gmail.com> 2014-03-19 16:23:52 PDT ---
Urgh, fixing this is going to be a breaking change, but not necessarily fix
bugs.

assert(zip("abc", "123").back == tuple('c', '3'));

That's correct, and works, but your fix requires length and indexing, which
narrow strings don't have.

If indexing and length aren't available, back should assert if the stopping
policy is not requireSameLength.

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list