Skip to content

Commit

Permalink
don't intuit seq succ/pred when endpoint is Code
Browse files Browse the repository at this point in the history
  • Loading branch information
TimToady committed Apr 8, 2015
1 parent 9216543 commit 0bc0df8
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion S03-sequence/nonnumeric.t
@@ -1,7 +1,7 @@
use v6;
use Test;

plan 39;
plan 40;

# L<S03/List infix precedence/'C<.succ> is assumed'>

Expand Down Expand Up @@ -104,6 +104,16 @@ is ('1a', '1b' ... '1e').Str, '1a 1b 1c 1d 1e', 'sequence with strings that star
is ('.' ... '0').Str, ". / 0", "mixture";
}

{
my class H {
has $.y = 5;
method succ { H.new(y => $.y + 1) }
method pred { H.new(y => $.y - 1) }
method gist { $.y }
}
is (H.new ... *.y > 10).gist, '5 6 7 8 9 10 11', "intuition does not try to cmp a WhateverCode";
}

done;

# vim: ft=perl6

0 comments on commit 0bc0df8

Please sign in to comment.