Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
optimizers got to take special care of any/all/none due to flattening
  • Loading branch information
timo committed Jan 27, 2013
1 parent 8b2fc6f commit 865c95f
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion S03-junctions/boolean-context.t
@@ -1,6 +1,6 @@
use v6;
use Test;
plan 70;
plan 73;

# L<S03/Junctive operators/>

Expand Down Expand Up @@ -135,4 +135,11 @@ ok do if 1 | 2 | 3 <= 3 <= 2 { 0 } else { 1 };
ok do if 1 <= 1 & 2 & 3 & 4 <= 4 { 1 } else { 0 };
ok do if 1 <= 1 & 2 & 3 & 4 <= 3 { 0 } else { 1 };

{
my @a = 2, 3;
ok do if any(1, @a, 4) == 3 { 1 } else { 0 }, "flattening in any works";
ok do if all(1, @a, 4) <= 4 { 1 } else { 0 }, "flattening in all works";
ok do if none(1, @a, 4) > 4 { 1 } else { 0 }, "flattening in none works";
}

# vim: ft=perl6

0 comments on commit 865c95f

Please sign in to comment.