[Issue 21258] Tuple parameters with defaults use the first tuple element for all defaults since 2.094.0-beta.1

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Sep 26 20:09:01 UTC 2020


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

--- Comment #4 from Dlang Bot <dlang-bot at dlang.rocks> ---
dlang/dmd pull request #11793 "merge stable" was merged into master:

- e0a9304324b7d1d2fcf9662c2f77b5c42e804b05 by Geod24:
  Fix 21258 - Tuple parameters use the first element of a default tuple value

  The logic tried to use a single variable for both keeping track of the
  original index and the extended index, but actually only tracked the
  extended index.
  Since `if (tupleStartIdx < eidx) tupleStartIdx = eidx` would be true
  for every iteration, we would always assign the value at index 0.

https://github.com/dlang/dmd/pull/11793

--


More information about the Digitalmars-d-bugs mailing list