# New Ticket Created by  "Carl Mäsak" 
# Please include the string:  [perl #57340]
# in the subject line of all future correspondence about this issue. 
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=57340 >


>From S06 <http://dev.perl.org/perl6/doc/design/syn/S06.html>:

] {...} is always a block. However, if it is completely empty or consists
] of a single list, the first element of which is either a hash or a pair, it
] is executed immediately to compose a Hash object.
]
] [...]
]
] $obj =      { 1=>2, 3=>4, 5=>6 };   # Anonymous hash

Rakudo is not up to spec on this point:

$ ./perl6 -e 'my $a = { 1 => 2 }; say $a<1>'
get_pmc_keyed() not implemented in class 'Closure'
current instr.: '_block11' pc 39 (EVAL_13:21)
called from Sub 'parrot;PCT::HLLCompiler;eval' pc 806
(src/PCT/HLLCompiler.pir:481)
called from Sub 'parrot;PCT::HLLCompiler;command_line' pc 1305
(src/PCT/HLLCompiler.pir:708)
called from Sub 'parrot;Perl6::Compiler;main' pc 14567 (perl6.pir:172)

$ ./perl6 -e 'my $a = {}; say $a.keys'
Method 'keys' not found for invocant of class 'Closure'
current instr.: '_block11' pc 39 (EVAL_13:19)
called from Sub 'parrot;PCT::HLLCompiler;eval' pc 806
(src/PCT/HLLCompiler.pir:481)
called from Sub 'parrot;PCT::HLLCompiler;command_line' pc 1305
(src/PCT/HLLCompiler.pir:708)
called from Sub 'parrot;Perl6::Compiler;main' pc 14567 (perl6.pir:172)

Reply via email to