New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rakudo doesn't allow declaration of anonymous variables #1525
Comments
From @masak<masak> alpha: my @ = 1, 2, 3 |
From @bbkr[16:35] <moritz_> rakudo: say (my @ = 1, 2, 3 ) taken for tests |
The RT System itself - Status changed from 'new' to 'open' |
From @bbkrtests added in t/spec/S04-declarations/my.t |
@bbkr - Status changed from 'open' to 'resolved' |
From @kylehaThis is an automatically generated mail to inform you that tests are now available in t/spec/S04-declarations/my.t commit 09af872d08dccd39998758c0ed5ae7e3cd9f37b2 [t/spec] tests for RT #72946 Rakudo doesnt allow declaration of anonymous variables Inline Patchdiff --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 |
Migrated from rt.perl.org#72946 (status was 'resolved')
Searchable as RT72946$
The text was updated successfully, but these errors were encountered: