[Issue 23844] chain(only) doesn't support immutable structs

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed May 10 09:54:17 UTC 2023


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

Dlang Bot <dlang-bot at dlang.rocks> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #2 from Dlang Bot <dlang-bot at dlang.rocks> ---
dlang/phobos pull request #8736 "Fix issue 23844: Support ranges with immutable
fields (like `only` with `immutable struct`) in `chain`." was merged into
master:

- b9c6e3ca4b6fec799964394ad3e080d7b347f658 by Mathis Beer:
  Fix issue 23844: Support ranges with immutable fields (like `only` with
`immutable struct`) in `chain`.
  `only` is a range that may be *mutable*, but not *assignable*. `chain` falls
over here because it assumes it can make a struct with ranges, and reassign
them with new values, which isn't necessarily the case even if the ranges are
not `const`.
  Solved by creating a separate tuple of `Rebindable` ranges for this case.

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

--


More information about the Digitalmars-d-bugs mailing list