# New Ticket Created by Moritz Lenz
# Please include the string: [perl #63596]
# in the subject line of all future correspondence about this issue.
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=63596 >
# file next-bug.pl
use v6;
sub s($i is copy) {
my @array;
for 1..3 {
@array.push($i);
my $i = 1 + $i; # <--- Error
}
}
s(9);
# end of file
$ perl6 next-bug.pl
Null PMC access in type()
current instr.: 'parrot;P6metaclass;dispatch' pc 130
(src/classes/ClassHOW.pir:93)
called from Sub '_block35' pc 334 (EVAL_19:140)
called from Sub 's' pc 202 (EVAL_19:85)
called from Sub '_block14' pc 71 (EVAL_19:42)
called from Sub '!UNIT_START' pc 17743 (src/builtins/guts.pir:325)
called from Sub 'parrot;PCT;HLLCompiler;eval' pc 950
(src/PCT/HLLCompiler.pir:527)
called from Sub 'parrot;PCT;HLLCompiler;evalfiles' pc 1275
(src/PCT/HLLCompiler.pir:688)
called from Sub 'parrot;PCT;HLLCompiler;command_line' pc 1456
(src/PCT/HLLCompiler.pir:778)
called from Sub 'parrot;Perl6;Compiler;main' pc 22036 (perl6.pir:162)
If I remove either the 'my' in the marked line, or the @array.push($i) the
error goes away.
--
Moritz Lenz
http://perlgeek.de/ | http://perl-6.de/ | http://sudokugarden.de/