petdance/scratch — Issue #77: Bug in subroutine calling conventions
Author: petdance
Created: 2011-11-01 04:24:47+00:00
State: open

When running this code with the command 'parrot -':

.sub 'main' :main
'aux'(5, 'hello', "b" => 3.14)
.end

.sub 'aux'
.param int a

.param num b :named("b")

.param string c :optional

.param int has_c :opt_flag

say a

say b

say c
.end

I get this error:

FixedIntegerArray: index out of bounds!

current instr.: 'aux' pc 16 (-:5)

called from Sub 'main' pc 11 (-:2)