Skip to content

Commit

Permalink
[t/spec] test for rakudo regression (Num += Int)
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.pugscode.org/pugs@22983 c213334d-75ef-0310-aa23-eaa082d1ae64
  • Loading branch information
moritz committed Nov 11, 2008
1 parent d484b53 commit 813e945
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion S03-operators/increment.t
Expand Up @@ -2,7 +2,7 @@ use v6;

use Test;

plan 39;
plan 41;

#L<S03/Autoincrement precedence>

Expand Down Expand Up @@ -150,3 +150,15 @@ is($moo, 0, "var was not touched");
eval_dies_ok ' "x"-- ', "can't postdecrement a literal string";
eval_dies_ok ' --"x" ', "can't predecrement a literal string";
}

# this used to be a rakudo regression
#?rakudo skip 'Num += Int'
{
my $x = 2.0;
$x += 1;
ok $x == 3.0, 'can add Int to Num with +=';

my Num $y = 2.0;
$y += 1;
ok $y == 3.0, 'can add Int to Num with += and type constraint';
}

0 comments on commit 813e945

Please sign in to comment.