Question about opSlice

via Digitalmars-d digitalmars-d at puremagic.com
Tue Mar 17 07:42:49 PDT 2015


On Tuesday, 17 March 2015 at 13:57:18 UTC, Ilya Ivanov wrote:
> Can please someone tell me what is wrong with my code or is it a
> bug?
> The compilation errors are:
> D:\DLang\test.d(184): Error: vector[0..2] is not an lvalue
> D:\DLang\test.d(186): Error: vector[0..2] is not an lvalue
> D:\DLang\test.d(188): Error: vector.opSlice(0u, 2u) is not an
> lvalue
> D:\DLang\test.d(190): Error: vector.opSlice(0u, 2u) is not an
> lvalue
>
> If I use old style opSlice (the commented out code) everything
> works fine.

Your example compiles fine for me with both DMD 2.067rc1 and 
master. Which compiler version are you using?


More information about the Digitalmars-d mailing list