Consider code below:
```
import std;
void main()
{
auto a = [1, 2, 3];
a.each!(x => callback(x));
void callback(int a)
{
writeln(a);
}
}
```
The error message is completely bogus. It should just say that it can't find "callback".
Current error message:
```
onlineapp.d(7): Error: none of the overloads of template `onlineapp.main.each!((x) => callback(x)).each` are callable using argument types `!()(int[])`
/dlang/dmd/linux/bin64/../../src/phobos/std/algorithm/iteration.d(908): Candidates are: `each(Range)(Range r)`
with `Range = int[]`
must satisfy one of the following constraints:
` isRangeIterable!Range
__traits(compiles, typeof(r.front).length)`
/dlang/dmd/linux/bin64/../../src/phobos/std/algorithm/iteration.d(969): `each(Iterable)(auto ref Iterable r)`
with `Iterable = int[]`
must satisfy one of the following constraints:
` isForeachIterable!Iterable
__traits(compiles, Parameters!(Parameters!(r.opApply)))`
```
Comment #1 by nick — 2023-02-01T21:41:16Z
*** This issue has been marked as a duplicate of issue 11907 ***