Bug 24064 – Cannot chain() array and immutable Nullable

Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P1
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2023-08-02T20:30:45Z
Last change time
2023-08-16T00:28:02Z
Keywords
pull
Assigned to
No Owner
Creator
elpenguino+D

Comments

Comment #0 by elpenguino+D — 2023-08-02T20:30:45Z
``` immutable Nullable!string foo = "b"; string[] bar = ["a"]; assert(chain(bar, foo).equal(["a", "b"])); ``` Before DMD 2.105.0, this code ran successfully. Regression appears to be caused by https://github.com/dlang/phobos/commit/b9c6e3ca4b6fec799964394ad3e080d7b347f658.
Comment #1 by dlang-bot — 2023-08-03T06:17:41Z
@FeepingCreature created dlang/phobos pull request #8791 "Fix issue 24064: use consistent types for ResultRanges." fixing this issue: - Fix issue 24064: use consistent types for ResultRanges. `source` is `Unqual!Ranges`, not `Ranges`. But `T` may not be constructible from `Unqual!T`, for instance if T is a struct. https://github.com/dlang/phobos/pull/8791
Comment #2 by dlang-bot — 2023-08-03T07:10:19Z
dlang/phobos pull request #8791 "Fix issue 24064: use consistent types for ResultRanges." was merged into stable: - c7f9e5ae106f83e6606442fb8be637b400bbd57d by Mathis Beer: Fix issue 24064: use consistent types for ResultRanges. `source` is `Unqual!Ranges`, not `Ranges`. https://github.com/dlang/phobos/pull/8791
Comment #3 by dlang-bot — 2023-08-16T00:28:02Z
dlang/phobos pull request #8800 "merge stable" was merged into master: - 75372efef23feeb5067a11f2f726844786dcf735 by FeepingCreature: Fix issue 24064: use consistent types for ResultRanges. (#8791) `source` is `Unqual!Ranges`, not `Ranges`. https://github.com/dlang/phobos/pull/8800