Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
A user-declared infix:<;> clashes with statement stopper ';' in Rakudo
  • Loading branch information
ivanoff committed Aug 11, 2013
1 parent 03e0f30 commit 1fac507
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions S06-operator-overloading/semicolon.t
@@ -0,0 +1,20 @@
use v6;
use Test;
plan 3;

# A user-declared infix:<;> clashes with statement stopper ';' in Rakudo

my $marker = 0;

sub infix:<;>($a, $b) {
$marker = 1;
0, 0
};

my @a = 1; 2; 3;


is +@a, 1, '@a is array with 1 element';
is @a[0], 1, 'first element of @a eq 1';
is $marker, 0, 'overloaded infix ; hasn\'t been called';

0 comments on commit 1fac507

Please sign in to comment.