Scenario: Do a straight up "Array = Array". YOu must compile with -w to see it.
//----
struct S
{
int[2] ii;
alias ii this;
}
void main()
{
S s;
int[2] ii;
ii = ii; //OK!
ii = s; //Warning: explicit element-wise assignment (ii)[] = (s)[] is better than ii = s
}
//----
"ii = ii;" triggers normal static array to static array copy. No need to slice.
When calling "ii = s;" though, the compiler complains that you didn't slice your array. This is wrong since "ii" is a static array, and "s" aliases to a compatible static array. However, my guess is the compiler choses to see it as dynamic array assignment, and that is the reason why it complains.