Skip to content
Browse files

Make sure .perl works correctly on Array's with constrained values

  • Loading branch information...
1 parent 577a030 commit 8bd124f7ff378d55a127d64ca85f50ba213c75ea @lizmat lizmat committed Jul 8, 2013
Showing with 7 additions and 0 deletions.
  1. +7 −0 src/core/Array.pm
View
7 src/core/Array.pm
@@ -132,6 +132,13 @@ class Array {
self.gimme($pos + 1);
nqp::bindpos(nqp::getattr(self, List, '$!items'), $pos, bindval)
}
+ multi method perl(::?CLASS:D \SELF:) {
+ 'Array['
+ ~ TValue.perl
+ ~ '].new('
+ ~ self.map({.perl}).join(', ')
+ ~ ')';
+ }
# XXX some methods to come here...
}
method PARAMETERIZE_TYPE(Mu $t) {

0 comments on commit 8bd124f

Please sign in to comment.
Something went wrong with that request. Please try again.