← Back to index
|
Original Bugzilla link
Bug 3815 – Array sum to a constant and assign to not initialized dynamic array
Status
RESOLVED
Resolution
DUPLICATE
Severity
normal
Priority
P2
Component
druntime
Product
D
Version
D2
Platform
x86
OS
Windows
Creation time
2010-02-18T09:55:00Z
Last change time
2015-06-09T01:27:40Z
Assigned to
sean
Creator
bearophile_hugs
Comments
Comment #0
by bearophile_hugs — 2010-02-18T09:55:05Z
import std.stdio: writeln; void main() { int[] a1 = [1, 2, 3]; auto a3 = a1[] + 4; writeln(a3); // 1 2 3 0 1935766371 1768515939 1764585331 } At the end a3 contains garbage, and there's no compile-time error.
Comment #1
by matti.niemenmaa+dbugzilla — 2010-02-18T11:20:29Z
*** This issue has been marked as a duplicate of issue 3066 ***