[Issue 17116] std.typecons.ReplaceType is not able to process const delegate

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Mon Jan 23 12:57:10 PST 2017


https://issues.dlang.org/show_bug.cgi?id=17116

b2.temp at gmx.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
           Severity|minor                       |normal

--- Comment #1 from b2.temp at gmx.com ---
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

--


More information about the Digitalmars-d-bugs mailing list