Skip to content

Commit

Permalink
Add more tests for sigilless declarations
Browse files Browse the repository at this point in the history
  • Loading branch information
vrurg committed Aug 15, 2022
1 parent 97f3444 commit 75f1bf6
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion S04-declarations/my-6c.t
Expand Up @@ -3,7 +3,7 @@ use Test;
use lib $?FILE.IO.parent(2).add: 'packages/Test-Helpers';
use Test::Util;

plan 110;
plan 112;

#L<S04/The Relationship of Blocks and Declarations/"declarations, all
# lexically scoped declarations are visible">
Expand Down Expand Up @@ -357,6 +357,19 @@ eval-lives-ok 'multi f(@a) { }; multi f(*@a) { }; f(my @a = (1, 2, 3))',
is x6, 8, 'can signature-bind to my (\a, \b) and get correct values (2)';
}

# https://github.com/rakudo/rakudo/issues/5027
{
eval-lives-ok 'my (Map \foo) = Map.new; foo{1};',
"siglless declared within parens can be used as associative";
}

# https://github.com/rakudo/rakudo/issues/3919
#?rakudo todo "not yet fixed"
{
my \v1 = 42;
is v1, 42, "lexical version-like symbol is not treated as a version constant";
}

{
is my sub {42}(), 42, 'can call postcircumfix () on subs inside my'
}
Expand Down

0 comments on commit 75f1bf6

Please sign in to comment.