[Issue 1748] New: Wrong stringof for templated classes

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Dec 23 20:13:01 PST 2007


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

           Summary: Wrong stringof for templated classes
           Product: D
           Version: unspecified
          Platform: Macintosh
        OS/Version: Mac OS X
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla at digitalmars.com
        ReportedBy: csantander619 at gmail.com


I understand that "class A(T)" is syntactic sugar for "template A(T){class
A...", but I still think this is wrong behavior:
---
class A(T) {}
alias A!(int) Aint;

A!(int) a;

pragma(msg, typeof(a).stringof);
pragma(msg, Aint.stringof);

static assert(typeof(a).stringof != "A", "typeof(a).stringof shouldn't be A");
---
Both pragmas print A, when I think it should be A!(int).

Tested with GDC rev 198, but this is part of the front end.


-- 



More information about the Digitalmars-d-bugs mailing list