http://d.puremagic.com/issues/show_bug.cgi?id=8312
Summary: Too many error messages with a writeln of fixed size array Product: D Version: D2 Platform: x86 OS/Version: Windows Status: NEW Keywords: diagnostic Severity: minor Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: bearophile_h...@eml.cc --- Comment #0 from bearophile_h...@eml.cc 2012-06-27 09:39:16 PDT --- This is wrong D2 code (because currently D doesn't have variable length arrays, and n is a run-time value): import std.stdio; void main() { uint n = 1; uint[n + 1] foo; writeln(foo); } I think it prints too many error messages (DMD 2.060alpha): test.d(4): Error: variable n cannot be read at compile time test.d(4): Error: Integer constant expression expected instead of n + 1u test.d(4): Error: Integer constant expression expected instead of n + 1u test.d(4): Error: Integer constant expression expected instead of n + 1u test.d(4): Error: Integer constant expression expected instead of n + 1u test.d(4): Error: Integer constant expression expected instead of n + 1u test.d(4): Error: variable n cannot be read at compile time test.d(4): Error: Integer constant expression expected instead of n + 1u test.d(4): Error: Integer constant expression expected instead of n + 1u test.d(4): Error: Integer constant expression expected instead of n + 1u test.d(4): Error: variable n cannot be read at compile time test.d(4): Error: Integer constant expression expected instead of n + 1u test.d(4): Error: Integer constant expression expected instead of n + 1u test.d(4): Error: Integer constant expression expected instead of n + 1u test.d(4): Error: variable n cannot be read at compile time test.d(4): Error: Integer constant expression expected instead of n + 1u test.d(4): Error: Integer constant expression expected instead of n + 1u test.d(4): Error: variable n cannot be read at compile time test.d(4): Error: Integer constant expression expected instead of n + 1u test.d(4): Error: Integer constant expression expected instead of n + 1u test.d(4): Error: Integer constant expression expected instead of n + 1u -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------