presence of function template prevents diagnostic

Max Haughton maxhaton at gmail.com
Mon Nov 16 18:34:14 UTC 2020


On Monday, 16 November 2020 at 17:03:32 UTC, Steven Schveighoffer 
wrote:
> On 11/14/20 5:44 PM, kdevel wrote:
>
>> $ dmd -version=X -i foo
>> $ ./foo
>> void A.bar(int s)
>> 
>> Is the latter behavior intended or a bug?
>
> That seems like a bug. It shouldn't be less ambiguous because 
> you *added* an overload that can also handle it...
>
> -Steve

It could be technically kosher because of template lookup but I'm 
not sure if the behaviour is actually specified in the standard. 
Probably should be a bug.


More information about the Digitalmars-d-learn mailing list