[Issue 1168] Passing a .stringof of an expression as a template value parameter results in the string of the type
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Sep 5 13:47:23 PDT 2009
http://d.puremagic.com/issues/show_bug.cgi?id=1168
Jeremie Pelletier <jeremiep at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jeremiep at gmail.com
--- Comment #2 from Jeremie Pelletier <jeremiep at gmail.com> 2009-09-05 13:47:22 PDT ---
The following patch to mtype.c fix the issue:
--- ..\src\orig\mtype.cpp Thu Sep 03 01:01:40 2009
+++ ..\src\dmd\mtype.cpp Sat 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: -------
More information about the Digitalmars-d-bugs
mailing list