basex
basex copied to clipboard
Add coercion for array lookup key
Per XQuery 4, the different forms of accessing an array element, by
- using the array as a function item,
-
array:get, and - the lookup operator
?,
are all subject to the coercion rules with respect to the array index.
This change invokes SeqType.coerce on the key from within XQArray.getInternal.
The corresponding QT4 test cases are Lookup-019a, Lookup-119a, and UnaryLookup-019a.