Another example of how AI is bad, bug fix for 20875
user1234
user1234 at 12.de
Tue Apr 7 12:41:59 UTC 2026
see https://github.com/dlang/dmd/issues/20875
```d
struct S
{
auto front() {}
}
void test()
{
S res;
ulong x;
typeof(res.front)(x);
}
```
the problem is not about arguments. The problem is that the
sub-expression is not callable. I.E the error message shoud be
the same as when you unfortunatetly, completly exhausted after a
12 hours shift, write
```d
void main()
{
alias FT = void(int);
FT(0);
}
```
the problem is that the coder wrote a call on a type. If that
type implements a static opCall then "allrighty" otherwise it's
not ok to output
> expected 0 arguments, not 1 for non-variadic fun...
It's a bad fix.
More information about the Digitalmars-d
mailing list