http://d.puremagic.com/issues/show_bug.cgi?id=8312
--- Comment #4 from bearophile_h...@eml.cc 2012-07-25 07:24:39 PDT ---
With this program:
import std.stdio;
void main() {
uint n = 1;
uint[n + 1] foo;
writeln(foo);
}
DMD 2.060beta prints:
temp.d(4): Error: variable n cannot be
http://d.puremagic.com/issues/show_bug.cgi?id=8312
--- Comment #5 from Kenji Hara k.hara...@gmail.com 2012-07-25 08:02:42 PDT ---
(In reply to comment #4)
Probably the errors of the second program too are improved:
import std.stdio: writeln;
void main() {
immutable int[] A = [1];
http://d.puremagic.com/issues/show_bug.cgi?id=8312
--- Comment #6 from bearophile_h...@eml.cc 2012-07-25 08:27:31 PDT ---
(In reply to comment #5)
No, this is expected behavior. With the declaration `int[A.lehgth] B;`,
A.length is interpreted to integer constant expression 1, then the type
http://d.puremagic.com/issues/show_bug.cgi?id=8312
Kenji Hara k.hara...@gmail.com changed:
What|Removed |Added
Status|NEW |RESOLVED
/a3b4375047da593c3cd9c7d84751ee8733116303
fix Issue 8312 - Too many error messages with a writeln of fixed size array
https://github.com/D-Programming-Language/dmd/commit/c7f2cd0fad0d56219e4ff2a6b72f43f677b48452
Merge pull request #1057 from 9rnsr/fix8312
Issue 8312 - Too many error messages with a writeln of fixed size array
http://d.puremagic.com/issues/show_bug.cgi?id=8312
Kenji Hara k.hara...@gmail.com changed:
What|Removed |Added
Keywords||pull
http://d.puremagic.com/issues/show_bug.cgi?id=8312
--- Comment #1 from bearophile_h...@eml.cc 2012-07-08 15:04:14 PDT ---
A related case shown in D.learn (reduced):
import std.stdio: writeln;
void main() {
immutable int[] A = [1];
int[A.length] B;
writeln(A);
writeln(B);
}