mini:~/Projects/parrot mdiep$ cat test.pir
.sub main :main
$P0 = new .Array
$P0 = 0
$P1 = new .Array
$P1 = 1
$P2 = new .String
$P2 = 'Foo'
$P1[0] = $P2
splice $P0, $P1, 20, 0
end
.end
mini:~/Projects/parrot mdiep$ parrot test.pir
list structure chaos!
That's an awful error. It should say "Array index out of bounds" or
anything more useful than "list structure chaos!".
--
Matt Diephouse
> splice $P0, $P1, 20, 0
> mini:~/Projects/parrot mdiep$ parrot test.pir
> list structure chaos!
>
> That's an awful error. It should say "Array index out of bounds" or
> anything more useful than "list structure chaos!".
Well, a missing bounds check was causing "list structure chaos!" - that's it.
Anyway, this should be fixed now (r13890). But please note that the list.c
code does allow splicing beyond the end. It's probably up to array.pmc to
impose some limits (and up to PerlArray to not to do so).
leo