Bug 6516 – Regression(2.055 beta) [CTFE] ICE(constfold.c) involving new dchar[]

Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
Other
OS
Windows
Creation time
2011-08-16T22:57:00Z
Last change time
2011-08-24T12:57:52Z
Keywords
ice-on-valid-code
Assigned to
nobody
Creator
bus_dbugzilla

Comments

Comment #0 by bus_dbugzilla — 2011-08-16T22:57:45Z
dstring foo() { return cast(dstring) new dchar[](0); } static assert(foo() == ""d);
Comment #1 by bus_dbugzilla — 2011-08-16T23:41:16Z
I think this may be another manifestation of the same bug: dstring foo() { auto result = new dchar[](1); result[0..1] = "a"d; return cast(dstring)result; } static assert(foo() == "a"d); Result: assert interpret.c(2831) sz == newstr->sz
Comment #2 by bugzilla — 2011-08-24T12:57:52Z