[phobos] [D-Programming-Language/phobos] a00c3c: Fix bug 8900 - Zip with infinite range fails.

GitHub noreply at github.com
Thu Dec 13 09:00:12 PST 2012


  Branch: refs/heads/master
  Home:   https://github.com/D-Programming-Language/phobos
  Commit: a00c3c825c863c0c53cb69ab907c7be539bf51e4
      https://github.com/D-Programming-Language/phobos/commit/a00c3c825c863c0c53cb69ab907c7be539bf51e4
  Author: Peter Alexander <peter.alexander.au at gmail.com>
  Date:   2012-10-27 (Sat, 27 Oct 2012)

  Changed paths:
    M std/format.d
    M std/range.d

  Log Message:
  -----------
  Fix bug 8900 - Zip with infinite range fails.

`std.range.Zip` contains a `Tuple`, whose `toString()` function calls `formatElement` which eventually calls this function, leading to a static call to `walkLength` on infinite ranges. Since pul request 880, `walkLength` doesn't work with infinite ranges, so it fails to compile.

This change ensures that `walkLength` is called with only valid range types.

Bug: http://d.puremagic.com/issues/show_bug.cgi?id=8900


  Commit: 259cd23d67b8025eebc5c46e3756e2c98337a663
      https://github.com/D-Programming-Language/phobos/commit/259cd23d67b8025eebc5c46e3756e2c98337a663
  Author: Andrei Alexandrescu <andrei at erdani.com>
  Date:   2012-12-13 (Thu, 13 Dec 2012)

  Changed paths:
    M std/format.d
    M std/range.d

  Log Message:
  -----------
  Merge pull request #901 from Poita/bug8900

Fix bug 8900 - Zip with infinite char range fails.


Compare: https://github.com/D-Programming-Language/phobos/compare/7086e08d2a83...259cd23d67b8


More information about the phobos mailing list