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

          Issue ID: 21925
           Summary: attribute inference not done on first `typeof` on
                    member function
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: [email protected]
          Reporter: [email protected]

struct S
{
    static f() {}
}

alias T1 = typeof(&S.f);
alias T2 = typeof(&S.f);

pragma(msg, T1); /* Prints "void function()". Should print the same as below.
*/
pragma(msg, T2); /* Prints "void function() pure nothrow @nogc @safe". */

static assert(is(T1 == T2)); /* Fails. Should pass. */
static assert(is(T1 == void function() pure nothrow @nogc @safe)); /* Fails.
Should pass. */

--

Reply via email to