[dmd-beta] D2 2.058 beta
andrei at erdani.com
Fri Feb 10 12:51:37 PST 2012
Yes, this is ambiguous.
On 2/10/12 12:05 PM, Martin Nowak wrote:
>>> This compiles for me without error. When it runs, I get a stack
>>> The reason looks clear - foo(Args) is recursively calling itself. I
>>> 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;
> dmd-beta mailing list
> dmd-beta at puremagic.com
More information about the dmd-beta