On 2017-07-13 20:07, JN wrote:
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...
https://github.com/dlang/DIPs/pull/71 -- /Jacob Carlborg