I'm not sure *what* said rules are, but as observed here:
https://github.com/D-Programming-Language/phobos/pull/1010#discussion_r2418181
The root issue is that IFTI should cast an immutable slice to a slice of immutables, but that doesn't happen with varargs:
//----
import std.stdio;
void foo1(Range)(Range)
{
writeln("Foo1: ", Range.stringof);
}
void foo2(Ranges...)(Ranges)
{
writeln("Foo2: ", Ranges[0].stringof);
}
void main()
{
immutable(int[]) a = [1, 2, 3];
foo1(a);
foo2(a);
}
//----
Foo1: immutable(int)[]
Foo2: immutable(int[])
//----
I'm not sure what the rules are, but I'd expect seeing something consistent in any case.