petdance/scratch — Issue #415: Bug in subroutine calling conventions
Author: petdance
Created: 2011-11-01 05:34:41+00:00
State: open
Labels: bug, core, Pri-normal, Sev-medium

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)
Trac ID #792