← Back to index
|
Original Bugzilla link
Bug 6467 – (D1 only) Static array is corrupted when concatenated
Status
RESOLVED
Resolution
WORKSFORME
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D1 (retired)
Platform
All
OS
All
Creation time
2011-08-10T23:19:15Z
Last change time
2019-11-07T08:13:11Z
Keywords
wrong-code
Assigned to
No Owner
Creator
Denis Shelomovskii
Comments
Comment #0
by verylonglogin.reg — 2011-08-10T23:19:15Z
This works fine with dmd v1.069: --- const staticArray = "abc"; void main() { static dynamicArray = staticArray ~ "d"; //corrupts staticArray pragma(msg, typeof(staticArray)); //char[3u] pragma(msg, typeof(dynamicArray)); //char[] static assert(staticArray == "abc"); assert(staticArray != "abc"); assert(staticArray == [cast(char)3, 0, 0]); } ---
Comment #1
by razvan.nitu1305 — 2019-11-07T08:13:11Z
This bug does not manifest in D2 and D1 is no longer supported. Closing as WORKSFORME.