| |
| Posted by Walter Bright | PermalinkReply |
|
Walter Bright
| http://d.puremagic.com/issues/show_bug.cgi?id=9587
Summary: rdmd now fails to compile due to Phobos changes
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Severity: regression
Priority: P2
Component: Phobos
AssignedTo: nobody@puremagic.com
ReportedBy: bugzilla@digitalmars.com
--- Comment #0 from Walter Bright <bugzilla@digitalmars.com> 2013-02-25 11:07:06 PST ---
ollie writes in the n.g.:
I did a new fetch of dmd, druntime, phobos and tools on win32 machine. Everything compiles until rdmd.exe in tools with an error stating that std.conv.to is CTFEable. The following patch fixes the problem. Thanks to everyone for their hard work to make D better.
diff --git a/std/typecons.d b/std/typecons.d
index 28dbcc3..ee8a3cc 100644
--- a/std/typecons.d
+++ b/std/typecons.d
@@ -323,7 +323,7 @@ private:
string decl = "";
foreach (i, name; staticMap!(extractName, fieldSpecs))
{
- enum numbered = toStringNow!(i);
+ enum numbered = to!(string)(i);
decl ~= "alias Identity!(field[" ~ numbered ~ "]) _" ~
numbered ~ ";";
if (name.length != 0)
{
@@ -2069,7 +2069,7 @@ private static:
// overloaded function with the name.
template INTERNAL_FUNCINFO_ID(string name, size_t i)
{
- enum string INTERNAL_FUNCINFO_ID = "F_" ~ name ~ "_" ~
toStringNow!(i);
+ enum string INTERNAL_FUNCINFO_ID = "F_" ~ name ~ "_" ~ to!(string)
(i);
}
/*
@@ -2329,7 +2329,7 @@ private static:
{
template PARAMETER_VARIABLE_ID(size_t i)
{
- enum string PARAMETER_VARIABLE_ID = "a" ~ toStringNow!(i);
+ enum string PARAMETER_VARIABLE_ID = "a" ~ to!(string)(i);
// default: a0, a1, ...
}
}
@@ -2516,7 +2516,7 @@ private static:
if (stc & STC.lazy_ ) params ~= "lazy ";
// Take parameter type from the FuncInfo.
- params ~= myFuncInfo ~ ".PT[" ~ toStringNow!(i) ~ "]";
+ params ~= myFuncInfo ~ ".PT[" ~ to!(string)(i) ~ "]";
// Declare a parameter variable.
params ~= " " ~ PARAMETER_VARIABLE_ID!(i);
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
|