On Wednesday, 10 August 2016 at 20:54:15 UTC, Steven Schveighoffer wrote:
On 8/10/16 2:08 PM, Lodovico Giaretta wrote:
[...]

The issue is that it tries using [] on the item to see if it defines a range-like thing. Since you don't define opSlice(), it automatically goes to the subrange.

This breaks for int[] as well as Array.

If I add opSlice to your code (and return this) it works.

This is definitely a bug, it should try range functions before opSlice. Please file.

-Steve

Wow. Thanks. I didn't know the compiler would try opSlice. I will file it.

Reply via email to