basex icon indicating copy to clipboard operation
basex copied to clipboard

Add coercion for array lookup key

Open GuntherRademacher opened this issue 1 year ago • 0 comments

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.

GuntherRademacher avatar Jun 10 '24 17:06 GuntherRademacher