Bug 6268 – [2.054 Beta Regression] std.string.strip no longer CTFE-able
Status
RESOLVED
Resolution
DUPLICATE
Severity
regression
Priority
P2
Component
phobos
Product
D
Version
D2
Platform
Other
OS
Windows
Creation time
2011-07-07T17:22:00Z
Last change time
2011-07-22T04:30:24Z
Keywords
rejects-valid
Assigned to
nobody
Creator
bus_dbugzilla
Comments
Comment #0 by bus_dbugzilla — 2011-07-07T17:22:36Z
// test.d:
import std.string;
enum str = strip("");
2.053:
> dmd -c test.d
{works}
2.054:
> dmd -c test.d
D:\DevTool\dmd2beta\dmd2\windows\bin\..\..\src\phobos\std\string.d(1468): Error:
_aApplycd2 cannot be interpreted at compile time, because it has no available s
ource code
D:\DevTool\dmd2beta\dmd2\windows\bin\..\..\src\phobos\std\string.d(1521): Error:
cannot evaluate stripLeft(s) at compile time
D:\DevTool\dmd2beta\dmd2\windows\bin\..\..\src\phobos\std\string.d(1521): Error:
cannot evaluate stripRight(stripLeft(s)) at compile time
testCtfeStrip.d(2): Error: cannot evaluate strip("") at compile time
Comment #1 by spam — 2011-07-08T00:20:21Z
actually there more functions affected by this regression:
std.string.toUpper and toLower too.
Especially those two break the build of cl4d (https://bitbucket.org/trass3r/cl4d)
Comment #2 by johann.macdonagh — 2011-07-08T15:20:09Z
I believe fixing this would also fix Issue 3512.
Comment #3 by clugdbug — 2011-07-22T04:30:24Z
This is an example of bug 3512.
*** This issue has been marked as a duplicate of issue 3512 ***