Re: presence of function template prevents diagnostic

2020-12-13 Thread kdevel via Digitalmars-d-learn
On Monday, 16 November 2020 at 18:34:14 UTC, Max Haughton wrote: [...] Probably should be a bug. filed as Issue 21481

Re: presence of function template prevents diagnostic

2020-11-16 Thread Max Haughton via Digitalmars-d-learn
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

Re: presence of function template prevents diagnostic

2020-11-16 Thread Steven Schveighoffer via Digitalmars-d-learn
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

presence of function template prevents diagnostic

2020-11-14 Thread kdevel via Digitalmars-d-learn
~~~A.d module A; import std.stdio; void bar (int s) { __PRETTY_FUNCTION__.writeln; } ~~~ ~~~foo.d import std.stdio; import A; alias bar = A.bar; version (X) { void bar (T) (T t) { __PRETTY_FUNCTION__.writeln; } } void bar (int s) { __PRETTY_FUNCTION__.writeln; } void main () { bar (1);