BaseXdb / basex

BaseX Main Repository.
http://basex.org
BSD 3-Clause "New" or "Revised" License
694 stars 265 forks source link

Add coercion for array lookup key #2303

Closed GuntherRademacher closed 4 months ago

GuntherRademacher commented 5 months ago

Per XQuery 4, the different forms of accessing an array element, by

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.