CTFE Bug?!
Vladimir Panteleev
vladimir at thecybershadow.net
Sun Oct 30 14:42:24 PDT 2011
On Sun, 30 Oct 2011 03:39:57 +0300, Mehrdad <wfunction at hotmail.com> wrote:
> I tried converting some C code I found on the internet to D.
Reduced version:
import std.stdio;
static double[1][] f()
{
auto array = new double[1][2];
array[0][0] = 1;
return array;
}
void main()
{
const result = f();
pragma(msg, result); // [[1],[1]]
writeln(result); // [[1], [nan]]
}
I don't know what's going on here.
--
Best regards,
Vladimir mailto:vladimir at thecybershadow.net
More information about the Digitalmars-d
mailing list