[dmd-beta] D2 2.058 beta

Martin Nowak dawg at dawgfoto.de
Fri Feb 10 12:05:40 PST 2012

>> This compiles for me without error. When it runs, I get a stack  
>> overflow.
>> The reason looks clear - foo(Args) is recursively calling itself. I  
>> don't
>> think it's a bug in dmd.
> I retried above code using new beta on two environments.
> Mac OS X 10.6.8 causes segmentation fault, but
> Scientific Linux release 6.0 64bit works fine.
> Does D allow above code?

If I understand that correctly then the chosen overload differs.
This prints "variadic" for me. Can you recheck this for other setups
and file a bug.

IMHO this should be an ambiguous overload error.
import std.stdio;

struct S
     void foo(V)(in V v)

     void foo(Args...)(auto ref const Args args)

void main()
     S s;

More information about the dmd-beta mailing list