Hi, Thank you Christian for the new 9.4.2. release! The function "f()" below will yield to the error: "Cannot promote item()? to xs:integer?: $result_4" This works in BaseX 9.1 ------ declare function local:f() as xs:integer()*{ let $id := client:connect("localhost", 1984, "admin", "admin") let $result := client:query($id, "1,2") let $close := client:close($id) return $result }; local:f() ----- I guess, that unpredictable return types at compile time default to item()? instead of item()* and thus cannot be used in a function returning anything else but item()? Has someone an idea for a solution/workaround for this? Best regards, Sebastian Eine Studie. Über 1300 Befragte. Ein Thema: Künstliche Intelligenz. https://ki.adesso.de/de/erste-schritte/index.html?pk_campaign=KI%20Report&pk... ------------------------------------------------------- >>> business. people. technology. <<< ------------------------------------------------------- adesso SE mit Sitz in Dortmund Vorstand: Michael Kenfenheuer (Vors.), Dirk Pothen, Andreas Prenneis, Stefan Riedel, Jörg Schroeder Vorsitzender des Aufsichtsrates: Prof. Dr. Volker Gruhn Amtsgericht Dortmund HRB 20663