http://d.puremagic.com/issues/show_bug.cgi?id=3796

           Summary: Result of .stringof is affected by unrelated function
                    declarations
           Product: D
           Version: 1.030
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nob...@puremagic.com
        ReportedBy: clugd...@yahoo.com.au


--- Comment #0 from Don <clugd...@yahoo.com.au> 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
change.
Related to bug 1424.

===TEST CASE===
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);

---OUTPUT---
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: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to