# New Ticket Created by Moritz Lenz # Please include the string: [perl #59382] # in the subject line of all future correspondence about this issue. # <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=59382 >
22:35 < moritz_> rakudo: my $a = { a => 42 }; say 1; $a = [ 0 ]; say 2 22:35 < p6eval> rakudo 31446: OUTPUT[1Odd number of elements found where hash expectedcurrent instr.: 'parrot;List;hash' pc 2877 (src/gen_builtins.pir:1999)] 22:38 < moritz_> rakudo: my $a = [0]; say 1; $a = 2; say $a.WHAT 22:38 < p6eval> rakudo 31446: OUTPUT[1Array] When a scalar variable holds either an array or or a hash, assigning to it always forces the LHS into the type of the previous container. There's a test for that in t/spec/S02-builtin_data_types/catch_type_cast_mismatch.t which I'll add to spectest_regression soon. -- Moritz Lenz http://perlgeek.de/ | http://perl-6.de/ | http://sudokugarden.de/