http://d.puremagic.com/issues/show_bug.cgi?id=3815
Summary: Array sum to a constant and assign to not initialized
dynamic array
Product: D
Version: 2.040
Platform: x86
OS/Version: Windows
Status: NEW
Severity: normal
Priority: P2
Component: druntime
AssignedTo: [email protected]
ReportedBy: [email protected]
--- Comment #0 from [email protected] 2010-02-18 09:55:05 PST ---
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.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------