[Issue 1291] New: .stringof for a class type returned from a template doesn't work

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Jun 24 12:55:16 PDT 2007


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

           Summary: .stringof for a class type returned from a template
                    doesn't work
           Product: D
           Version: 1.016
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla at digitalmars.com
        ReportedBy: onlystupidspamhere at yahoo.se


Code:

  template t() { alias Object t; }
  pragma(msg, t!().stringof);

Compiler output:

bug.d(2): Error: undefined identifier class Object.stringof
bug.d(2): pragma msg string expected for message, not 'class Object.stringof'

----

t!() should return type 'Object' which is a valid type and for which .stringof
exists. For example this works:

  alias Object t;
  pragma(msg, t.stringof);


-- 



More information about the Digitalmars-d-bugs mailing list