bearophile , dans le message (digitalmars.D.learn:29961), a écrit :
Andrej Mitrovic:
Maybe:
immutable(int[]) foo(in int[] x) pure {
return new immutable(int[1]);
}
void main() {}
I'd like to know why the code in my original post doesn't compile. I suspect
it's a DMD bug, but I
Christophe:
That is very consistent, so I don't think this
should be considered as a bug. There may be an improvement to ask to
make the compiler able to check when the cast to immutable is safe, but
I don't think there is a bug.
The compiler already performs such checks, in this case it
On Wed, 05 Oct 2011 19:19:37 -0400, bearophile bearophileh...@lycos.com
wrote:
Do you know why this program doesn't compile (with DMD 2.056head)?
immutable(int[]) foo(in int[] x) pure {
return new int[1];
}
void main() {}
It gives:
test.d(2): Error: cannot implicitly convert
I'm fairly sure this used to give me a stack overflow error:
void test() {
test();
}
void main() {
test();
}
Now it only returns exit code -1073741819.
Could this be related to how WinXP managers error reporting? It's
possible that I have some error reporting service disabled, but I'll
On Friday, October 07, 2011 05:28:39 Andrej Mitrovic wrote:
I'm fairly sure this used to give me a stack overflow error:
void test() {
test();
}
void main() {
test();
}
Now it only returns exit code -1073741819.
Could this be related to how WinXP managers error reporting?