Skip to content
Permalink
Browse files

Add specific @A[2;2].Array method

Fixes R#2257
  • Loading branch information...
lizmat committed Sep 12, 2018
1 parent c8db35e commit efbd58c8d5b5914669410cc13c939ce26d91dfa3
Showing with 8 additions and 0 deletions.
  1. +8 −0 src/core/ShapedArray.pm6
@@ -486,6 +486,14 @@
nqp::p6bindattrinvres(nqp::create(List),List,'$!reified',buf)
}

multi method Array(::?CLASS:D:) {
my @Array := nqp::eqaddr(self.of,Mu)
?? Array.new
!! Array[self.of].new;
self.iterator.push-all(@Array);
@Array
}

my class Iterate does Rakudo::Iterator::ShapeLeaf {
has Mu $!desc;
method !INIT(\list) {

0 comments on commit efbd58c

Please sign in to comment.
You can’t perform that action at this time.