[Issue 19525] Duration is not usable with zero-arg std.algorithm.sum

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Jan 2 09:59:20 UTC 2020


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

--- Comment #2 from Dlang Bot <dlang-bot at dlang.rocks> ---
dlang/phobos pull request #7339 "Improved error message when calling sum
without a default value" was merged into master:

- d93e7be91db04889bc5141ccb158c54f77fd2088 by Marco de Wild:
  Improved error message when calling sum without a default value

  If sum() is called, it tries to find a default value by constructing it with
0 (e.g. float(0)). This works for numbers, but produces obscure errors if the
value cannot be constructed this way (e.g. issue #19525). The error message now
states that the problem lies in the default value and suggests to supply one
instead.

https://github.com/dlang/phobos/pull/7339

--


More information about the Digitalmars-d-bugs mailing list