I didn't see anything in the issue tracker, nor did any tests fail,
but am I correct in assuming that array slicing is simply not
implemented yet in Rakudo?

$ ./perl6 -e 'my @a = (1,2,3); say @a[0 .. 1];'
3

it takes the range in item context, which is the size of the range,
and uses that as an index.  The PIR is pretty straightforward:

$I22 = "infix:.."($P20, $P21)
...
set $P24, $P23[$I22]

Is that supposed to work?  Is the PIR subscript operation supposed to
be smart enough to do the right thing with a subscript that happens to
be a Range?  Or does that onus fall on the Perl6 compiler to generate
PIR that handles it more manually?

-- 
Mark J. Reed <[EMAIL PROTECTED]>

Reply via email to