Skip to content

Commit

Permalink
Add tests for R#2865
Browse files Browse the repository at this point in the history
  • Loading branch information
lizmat committed May 15, 2019
1 parent 56dd56a commit 40c3f30
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion S02-types/hash.t
Expand Up @@ -3,7 +3,7 @@ use Test;
use lib $?FILE.IO.parent(2).add: 'packages/Test-Helpers';
use Test::Util;

plan 99;
plan 102;

# basic lvalue assignment
# L<S09/Hashes>
Expand Down Expand Up @@ -356,4 +356,14 @@ eval-lives-ok('my $rt75694 = { has-b => 42 }', "can have a bareword key starting
cmp-ok %m.cache, 'eqv', (:42foo,), 'Map.cache returns a List';
}

# R #2865
{
dies-ok { my %h = "a"|"b" => 42 },
'cannot use Junction to initialize hash';
dies-ok { my %h{Any} = "a"|"b" => 42 },
'cannot use Junction to initialize object hash';
dies-ok { my %h is Map = "a"|"b" => 42 },
'cannot use Junction to initialize Map';
}

# vim: ft=perl6

0 comments on commit 40c3f30

Please sign in to comment.