BaseXdb / basex

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

Partially applied functions, keywords, placeholders: ClassCastException #2333

Closed ChristianGruen closed 2 months ago

ChristianGruen commented 2 months ago
apply(
  function := ?,
  arguments := ?
)

Happens since f5b9293292f57502b7ada5f13fa6dcf6f8b69602. Before that, we got XPTY0004. The correct result would be a function item.

Exception in thread "main" java.lang.ClassCastException:
class org.basex.query.func.FuncLit cannot be cast to class org.basex.query.func.Closure
(org.basex.query.func.FuncLit and org.basex.query.func.Closure are in unnamed module of loader 'app')
        at org.basex.query.func.Functions.dynamic(Functions.java:124)
        at org.basex.query.func.Functions.get(Functions.java:89)
        at org.basex.query.QueryParser.functionCall(QueryParser.java:2664)
        at org.basex.query.QueryParser.primary(QueryParser.java:2297)
        at org.basex.query.QueryParser.postfix(QueryParser.java:2245)
        at org.basex.query.QueryParser.step(QueryParser.java:2088)
        at org.basex.query.QueryParser.path(QueryParser.java:2018)
        at org.basex.query.QueryParser.itemMap(QueryParser.java:1973)
        at org.basex.query.QueryParser.valueMap(QueryParser.java:1956)

An additional instanceOf check was dropped in 8428700dc84af2cedc357bdf2537199d2cf0f9a8. .