Summary: Result of .stringof is affected by unrelated function
           Product: D
           Version: 1.030
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD

--- Comment #0 from Don <> 2010-02-12 05:05:31 PST ---
All 3 pragmas should give the same result (except for uint/short/ushort).
But declaring function pointers (dg2 and dg3 below) causes the output to
Related to bug 1424.

void foo(ref uint i) { }
void foo2(ref short i) { }
void foo3(ref ushort i) { }

static if (is(typeof(foo2) P2 == function))
    alias P2 FooParams2;
static if (is(typeof(foo3) P3 == function))
    alias P3 FooParams3;

void function(ref FooParams2) dg2;
void function(ref FooParams3[0]) dg3;

pragma(msg, typeof(&foo).stringof);
pragma(msg, typeof(&foo2).stringof);
pragma(msg, typeof(&foo3).stringof);

void function(ref uint i)
void function(ref (ref short))
void function(ref ushort)
---OUTPUT if comment the lines creating dg2 and dg3---
void function(ref uint i)
void function(ref short i)
void function(ref ushort i)

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to