On 08/10/2016 10:54 PM, Steven Schveighoffer 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.

Related:

https://issues.dlang.org/show_bug.cgi?id=14619

Reply via email to