www.digitalmars.com         C & C++   DMDScript  

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

reply d-bugmail puremagic.com writes:
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 digitalmars.com
        ReportedBy: onlystupidspamhere 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);


-- 
Jun 24 2007
parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1291


bugzilla digitalmars.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED





Fixed DMD 1.018 and DMD 2.002


-- 
Jul 01 2007