Hello,
Why dmd cannot inference the type of 'arr' in my_func() parameter?
test.d:
import std.stdio;
void my_func(auto arr)
{
writeln(arr);
}
void main()
{
auto arr = new int[5];
arr = [1, 2, 3, 4, 5];
my_func(arr);
}
> dmd test.d
test.d(3): Error: undefined identifier arr
Adel