Indexing the empty array with a string should MAYBE throw, or perhaps it should never throw?
Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=4574
Reported by @zino
> array a = ({});
> a->apa;
(1) Result: ({ })
> a = ({ "banan" });
(2) Result: ({ /* 1 element */
"banan"
})
> a->apa;
Expected integer as string index, got "apa".
HilfeInput:1: HilfeInput()->___HilfeWrapper()
> a = ({ "banan":(["a":1]) });
Compiler Error: 1:Missing '}'.
Compiler Error: 1:syntax error, unexpected ':', expecting ')'
Compiler Error: 1:syntax error, unexpected '}', expecting TOK_LEX_EOF or
';'
> a = ({ (["banan":(["a":1])]) });
(3) Result: ({ /* 1 element */
([ /* 1 element */
"banan": ([ /* 1 element */
"a": 1
])
])
})
> a->banan;
(4) Result: ({ /* 1 element */
([ /* 1 element */
"a": 1
])
})
This seems a bit inconsistent.