Summary: Wrong .stringof value for parameter type of a templated
           Product: D
           Version: 2.020
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]

void foo(T)(T v)
    pragma(msg, typeof(v).stringof);
    pragma(msg, T.stringof);

    static assert(is(typeof(v) == T)); //ok
    static assert(typeof(v).stringof == T.stringof); // fails for foo(1)

void main()

The second foo instantiation fails because typeof(v).stringof evaluates to
"char" instead of expected "int"


Reply via email to