Bug 17116 – std.typecons.ReplaceType is not able to process const delegate

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2017-01-23T20:03:00Z
Last change time
2017-03-22T12:21:52Z
Assigned to
nobody
Creator
b2.temp

Comments

Comment #0 by b2.temp — 2017-01-23T20:03:39Z
Comment #1 by b2.temp — 2017-01-23T20:57:10Z
void main() { import std.typecons; alias ConstDg = void delegate(float) const; alias B = void delegate(int) const; alias A = ReplaceType!(float, int, ConstDg); static assert(is(B == A)); } /opt/compilers/dmd2/include/std/typecons.d-mixin-7364(7364): Error: @identifier or @(ArgumentList) expected, not @const /opt/compilers/dmd2/include/std/typecons.d-mixin-7364(7364): Error: valid attributes are @property, @safe, @trusted, @system, @disable, @nogc /opt/compilers/dmd2/include/std/typecons.d(7229): Error: template instance std.typecons.replaceTypeInFunctionType!(float, int, void delegate(float) const) error instantiating /d296/f412.d(6): instantiated from here: ReplaceType!(float, int, void delegate(float) const) /d296/f412.d(7): Error: static assert (is(void delegate(int) const == _error_)) is false
Comment #2 by github-bugzilla — 2017-01-24T15:22:37Z
Commits pushed to master at https://github.com/dlang/phobos https://github.com/dlang/phobos/commit/181db425c9f19b0fa20f0c2c6cd9287922a640ae fix issue 17116 - std.typecons.ReplaceType is not able to process const delegate https://github.com/dlang/phobos/commit/78be8eef4a597b9bd0e241402b32344601fb6570 Merge pull request #5060 from BBasile/issue-17116 fix issue 17116 - std.typecons.ReplaceType is not able to process const delegates
Comment #3 by github-bugzilla — 2017-02-24T18:15:30Z
Commits pushed to newCTFE at https://github.com/dlang/phobos https://github.com/dlang/phobos/commit/181db425c9f19b0fa20f0c2c6cd9287922a640ae fix issue 17116 - std.typecons.ReplaceType is not able to process const delegate https://github.com/dlang/phobos/commit/78be8eef4a597b9bd0e241402b32344601fb6570 Merge pull request #5060 from BBasile/issue-17116
Comment #4 by github-bugzilla — 2017-03-22T12:21:52Z
Commits pushed to stable at https://github.com/dlang/phobos https://github.com/dlang/phobos/commit/181db425c9f19b0fa20f0c2c6cd9287922a640ae fix issue 17116 - std.typecons.ReplaceType is not able to process const delegate https://github.com/dlang/phobos/commit/78be8eef4a597b9bd0e241402b32344601fb6570 Merge pull request #5060 from BBasile/issue-17116