Bug 22139 – Compiler special cases object.dup when compiling with -preview=dip1000

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2021-07-23T21:14:36Z
Last change time
2022-01-28T05:42:23Z
Keywords
pull
Assigned to
No Owner
Creator
moonlightsentinel

Comments

Comment #0 by moonlightsentinel — 2021-07-23T21:14:36Z
...as a workaround because it apparently breaks purity inference. This is problematic because it indicates that custom implementations will most likely be broken because they don't receive special treatment. See https://github.com/dlang/dmd/blob/3a9c2891b1f5bd650c42c2e623fbc3340d4d84f6/src/dmd/dcast.d#L855-L870
Comment #1 by dlang-bot — 2022-01-25T12:37:07Z
@dkorpel created dlang/dmd pull request #13571 "Fix issue 22139 - Compiler special cases object.dup when compiling with -preview=dip1000" fixing this issue: - Fix issue 22139 - Compiler special cases object.dup when compiling with -preview=dip1000 https://github.com/dlang/dmd/pull/13571
Comment #2 by dlang-bot — 2022-01-28T05:42:23Z
dlang/dmd pull request #13571 "Fix issue 22139 - Compiler special cases object.dup when compiling with -preview=dip1000" was merged into master: - 17296734567c6eed1973b5b4a20fe2767af82aac by dkorpel: Fix issue 22139 - Compiler special cases object.dup when compiling with -preview=dip1000 https://github.com/dlang/dmd/pull/13571