DIP 1020--Named Parameters--Community Review Round 1

ShadoLight ettienne.gilbert at gmail.com
Mon Apr 8 13:11:51 UTC 2019


On Monday, 8 April 2019 at 12:01:39 UTC, Yuxuan Shui wrote:

[..]


>> The compiler will directly reject...
>>
>> void fun(int a, int b) {...}
>> void fun(int c, int d) {...}
>>
>> ...  before you even try to call 'fun'.
>
> Contrary to popular belief, it won't.
>
> https://d.godbolt.org/z/Bmc-Qb


In line with popular belief it will. Try calling 1 of the 2 
functions i.e.:

int x = fun(3,4);

You have to call one of them for the compiler to be (un)able to 
resolve the call.


More information about the Digitalmars-d mailing list