D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 21801 - std.typecons.ReplaceType does not work for `in` parameters
Summary: std.typecons.ReplaceType does not work for `in` parameters
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: phobos (show other issues)
Version: D2
Hardware: All All
: P1 major
Assignee: No Owner
URL:
Keywords: pull
Depends on:
Blocks:
 
Reported: 2021-04-05 19:46 UTC by johanengelen
Modified: 2021-04-27 09:42 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description johanengelen 2021-04-05 19:46:21 UTC
Failing testcase:
```
import std.typecons;

void foo() {
    static assert(is(ReplaceType!(int, float, int function(in long, ref const int)) ==
            float function(in long, ref const float)));
    static assert(is(ReplaceType!(int, float, int function(long, in int*)) ==
            float function(long, in float*)));
}
```

Problem related to https://github.com/dlang/phobos/pull/7570
Comment 1 Dlang Bot 2021-04-05 19:54:48 UTC
@JohanEngelen created dlang/phobos pull request #7937 "fix Issue 21801 - std.typecons.ReplaceType does not work for `in` parameters" fixing this issue:

- fix Issue 21801 - std.typecons.ReplaceType does not work for `in` parameters
  
  See related: https://github.com/dlang/phobos/pull/7570

https://github.com/dlang/phobos/pull/7937
Comment 2 Dlang Bot 2021-04-15 07:36:57 UTC
dlang/phobos pull request #7937 "fix Issue 21801 - std.typecons.ReplaceType does not work for `in` parameters" was merged into stable:

- a3261ccb0d238f0ef5fc19fe8d2eab4fcfac0c4c by Johan Engelen:
  fix Issue 21801 - std.typecons.ReplaceType does not work for `in` parameters
  
  See related: https://github.com/dlang/phobos/pull/7570

https://github.com/dlang/phobos/pull/7937
Comment 3 Dlang Bot 2021-04-27 09:42:47 UTC
dlang/phobos pull request #8012 "merge stable" was merged into master:

- b8cdef5ffcc3e9c9c65df27387247d53629cf2df by Johan Engelen:
  fix Issue 21801 - std.typecons.ReplaceType does not work for `in` parameters
  
  See related: https://github.com/dlang/phobos/pull/7570

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