Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
add error for use of Multi as sequence limit
Signed-off-by: Moritz Lenz <moritz@faui2k3.org>
  • Loading branch information
dwhipp authored and moritz committed Feb 25, 2011
1 parent 1170a59 commit 7515fc2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/operators.pm
Expand Up @@ -401,7 +401,7 @@ our sub _HELPER_generate-series(@lhs, $rhs , :$exclude-limit) {
my $limit = ($rhs ~~ Whatever ?? Any !! $rhs);
return infinite-series(@lhs , $limit) if $rhs ~~ Whatever; #shortcut infinite series so we avoid the comparisions

#fail ('Limit arity cannot be larger than 1') if $limit ~~ Code && $limit.count > 1;
die 'Sequence limit cannot be a multi-sub or multi-method' if $limit ~~ Multi;
my $series = infinite-series(@lhs , $limit);

gather {
Expand Down

0 comments on commit 7515fc2

Please sign in to comment.