[Issue 1168] Passing a .stringof of an expression as a template value parameter results in the string of the type

2009-10-06 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=1168


Walter Bright  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||bugzi...@digitalmars.com
 Resolution||FIXED


--- Comment #4 from Walter Bright  2009-10-06 
02:12:29 PDT ---
Fixed dmd 1.048 and 2.033

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 1168] Passing a .stringof of an expression as a template value parameter results in the string of the type

2009-09-07 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=1168


Don  changed:

   What|Removed |Added

   Keywords||patch
 CC||clugd...@yahoo.com.au


--- Comment #3 from Don  2009-09-07 00:37:21 PDT ---
Cool! Add 'patch' to the list of keywords when you've submitted a patch, it
makes them easier to track.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 1168] Passing a .stringof of an expression as a template value parameter results in the string of the type

2009-09-05 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=1168


Jeremie Pelletier  changed:

   What|Removed |Added

 CC||jerem...@gmail.com


--- Comment #2 from Jeremie Pelletier  2009-09-05 13:47:22 
PDT ---
The following patch to mtype.c fix the issue:

--- ..\src\orig\mtype.cppThu Sep 03 01:01:40 2009
+++ ..\src\dmd\mtype.cppSat Sep 05 16:42:50 2009
@@ -4530,6 +4530,11 @@
 goto Lerror;
 goto L3;
 }
+else if(v && id == Id::stringof) {
+e = new DsymbolExp(loc, s, 0);
+*pe = new DotIdExp(loc, e, id);
+return;
+}
 t = s->getType();
 if (!t && s->isDeclaration())
 t = s->isDeclaration()->type;

It turns out stringof was applied on the type of the Dsymbol, not the symbol
itself.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---