Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[t/spec] test for rakudo regression (Num += Int)

git-svn-id: http://svn.pugscode.org/pugs@22983 c213334d-75ef-0310-aa23-eaa082d1ae64
  • Loading branch information...
commit 813e9457117ef90acb1d72c139b95ef88175408e 1 parent d484b53
moritz authored
Showing with 13 additions and 1 deletion.
  1. +13 −1 S03-operators/increment.t
View
14 S03-operators/increment.t
@@ -2,7 +2,7 @@ use v6;
use Test;
-plan 39;
+plan 41;
#L<S03/Autoincrement precedence>
@@ -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';
+}
Please sign in to comment.
Something went wrong with that request. Please try again.