Possible bug of "missing matching more than one candidate" in overload set
monkyyy
crazymonkyyy at gmail.com
Fri Feb 13 14:54:44 UTC 2026
On Friday, 13 February 2026 at 14:46:14 UTC, user1234 wrote:
> On Friday, 13 February 2026 at 14:19:20 UTC, monkyyy wrote:
>> Behavior looks correct to me, auto flattening and
>> specialization are both written down in the spec somewhere.
>>
>> [...]
>
> Yes but both `f` match !
>
> Unliquely situation (more interested with the semantics here)
> but what could happen is: in a library such an overload set
> exists and leads to bugs, because the compiler does not inform
> you.
```d
void f(T...)(){}
void f(T:int)(){ static assert(0);}
alias foo=f!int;
```
Template specialization rules can apply. I think its only a bug
if the order of the declarations effect behavior(which they do
often)
More information about the Digitalmars-d-learn
mailing list