Consider:

struct Foo
{
        int bar;
}

void processFoo(Foo foo)
{
}

void main()
{
        Foo f = {bar: 5};
        processFoo(f);                // ok
        processFoo(Foo(5));           // ok
        processFoo({bar: 5});         // fail
        processFoo(Foo({bar: 5}));    // fail
}


Whyyyy D? It makes no sense, the compiler knows what is the type of the first processFoo arg anyway...

Reply via email to