Bug 3615 – returning .idup of local static array doesn't work in ctfe

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
Other
OS
Linux
Creation time
2009-12-14T10:42:00Z
Last change time
2015-06-09T05:14:41Z
Keywords
rejects-valid
Assigned to
nobody
Creator
lutger.blijdestijn

Comments

Comment #0 by lutger.blijdestijn — 2009-12-14T10:42:37Z
string foo() {     char[1] d;     d[0] = 'd';     return d.idup; } pragma(msg, foo()); // "Error: cannot evaluate foo() at compile time"
Comment #1 by clugdbug — 2009-12-28T22:59:06Z
This is fixed in DMD2 svn 317 or earlier.
Comment #2 by clugdbug — 2010-01-01T11:14:22Z
Fixed DMD2.038.