This is an automatically generated mail to inform you that tests are now
available in t/spec/S04-declarations/my.t
commit 09af872d08dccd39998758c0ed5ae7e3cd9f37b2
Author: bbkr <b...@c213334d-75ef-0310-aa23-eaa082d1ae64>
Date: Tue Aug 3 14:54:41 2010 +0000
[t/spec] tests for RT #72946 Rakudo doesnt allow declaration of anonymous
variables
git-svn-id: http://svn.pugscode.org/p...@31897
c213334d-75ef-0310-aa23-eaa082d1ae64
diff --git a/t/spec/S04-declarations/my.t b/t/spec/S04-declarations/my.t
index c02ddac..f671634 100644
--- a/t/spec/S04-declarations/my.t
+++ b/t/spec/S04-declarations/my.t
@@ -1,7 +1,7 @@
use v6;
use Test;
-plan 65;
+plan 68;
#L<S04/The Relationship of Blocks and Declarations/"declarations, all
# lexically scoped declarations are visible">
@@ -260,4 +260,14 @@ eval_lives_ok 'my $x = 3; class A { has .$y = $x; }; say
A.new.y',
lives_ok {my ::a $a}, 'typing a my-declared variable as ::a works.';
#OK not used
}
+# RT #72946
+{
+ is ( my $ = 'foo' ), 'foo',
+ 'declaration of anonymous Scalar';
+ is ( my @ = 'foo', 'bar', 'baz' ), ['foo', 'bar', 'baz'],
+ 'declaration of anonymous Array';
+ is ( my % = 'foo' => 1, 'bar' => 2, 'baz' => 3 ), {'foo' => 1, 'bar' => 2,
'baz' => 3},
+ 'declaration of anonymous Hash';
+}
+
# vim: ft=perl6