On 10/28/2013 02:39 PM, Wolftein wrote:

>>> Error: variable org.ghrum.installer.option.CompilerTable cannot
>>> infer type from initializer
>>
>> The declaration is public static auto CompilerTable = [ ... ]
>
> Had to use string[string][] instead of auto.

Looks like a compiler bug to me. Reduced:

void foo(T)(T)
{
    pragma(msg, T.stringof);
}

void main()
{
    // Works and prints string[string][]
    pragma(msg, typeof([ [ "a" : "a"] ]).stringof);

    // Works and prints string[string][]
    foo([ [ "a" : "a"] ]);

    // However, this fails
    auto a = [ [ "a" : "a"] ];
}

Is there a reason why the last line cannot be compiled?

Ali

Reply via email to