CTFE Bug?!
Don
nospam at nospam.com
Thu Nov 3 01:32:53 PDT 2011
On 30.10.2011 22:42, Vladimir Panteleev wrote:
> 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.
>
Bug 6885. I'm working on a fix.
More information about the Digitalmars-d
mailing list