Skip to content

Commit

Permalink
Fix clone of multi-dim array to be deep enough
Browse files Browse the repository at this point in the history
We could potentially optimize this with a STORE that has to do a bit
less checking, because the shape is already good. However, in the
meantime, better to actually be correct!
  • Loading branch information
jnthn committed Feb 11, 2020
1 parent 50ca2ed commit 4a954cb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core.c/ShapedArray.pm6
Expand Up @@ -535,8 +535,8 @@
nqp::getattr(self,Array,'$!descriptor'));
nqp::bindattr(obj,::?CLASS,'$!shape',
nqp::getattr(self,::?CLASS,'$!shape'));
nqp::p6bindattrinvres(obj,List,'$!reified',
nqp::clone(nqp::getattr(self,List,'$!reified')))
obj.STORE(self);
obj
}
}

Expand Down

0 comments on commit 4a954cb

Please sign in to comment.