Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
return an empty list for foobar xx -1
  • Loading branch information
timo committed Aug 19, 2014
1 parent 18429d5 commit 2204422
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/core/List.pm
Expand Up @@ -639,6 +639,9 @@ multi infix:<xx>(Mu \x, $n) {
my int $size = $n.Int;

my Mu $rpa := nqp::list();
if $size < 0 {
return nqp::p6parcel($rpa, Any);
}
nqp::setelems($rpa, $size);
nqp::setelems($rpa, 0);

Expand Down

0 comments on commit 2204422

Please sign in to comment.