[Issue 8312] Too many error messages with a writeln of fixed size array
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Jul 25 07:24:42 PDT 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8312
--- Comment #4 from bearophile_hugs at 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 read at compile time
temp.d(4): Error: Integer constant expression expected instead of n + 1u
temp.d(5): Error: template std.stdio.writeln does not match any function
template declaration
...\dmd2\src\phobos\std\stdio.d(1578): Error: template std.stdio.writeln(T...)
cannot deduce template function from argument types !()(_error_)
That I think is now acceptable.
Probably the errors of the second program too are improved:
import std.stdio: writeln;
void main() {
immutable int[] A = [1];
int[A.length] B;
writeln(A);
writeln(B);
}
but I can't verify the error messages because now it compiles and runs with
output:
[1]
[0]
So I have added a dependency to Issue 8400. Until Issue 8400 is undone I can't
verify this Issue 8312 is truly fixed.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list