[Issue 23844] chain(only) doesn't support immutable structs
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Apr 18 14:55:11 UTC 2023
https://issues.dlang.org/show_bug.cgi?id=23844
Dlang Bot <dlang-bot at dlang.rocks> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |pull
--- Comment #1 from Dlang Bot <dlang-bot at dlang.rocks> ---
@FeepingCreature updated dlang/phobos pull request #8736 "Fix issue 23844:
Support ranges with immutable fields (like `only` with `immutable struct`) in
`chain`." fixing this issue:
- 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