{"action":"opened","issue":{"url":"https://api.github.com/repos/eXist-db/exist/issues/1553","repository_url":"https://api.github.com/repos/eXist-db/exist","labels_url":"https://api.github.com/repos/eXist-db/exist/issues/1553/labels{/name}","comments_url":"https://api.github.com/repos/eXist-db/exist/issues/1553/comments","events_url":"https://api.github.com/repos/eXist-db/exist/issues/1553/events","html_url":"https://github.com/eXist-db/exist/issues/1553","id":259634949,"number":1553,"title":"Arrow operator expression failure","user":{"login":"joewiz","id":59118,"avatar_url":"https://avatars2.githubusercontent.com/u/59118?v=4","gravatar_id":"","url":"https://api.github.com/users/joewiz","html_url":"https://github.com/joewiz","followers_url":"https://api.github.com/users/joewiz/followers","following_url":"https://api.github.com/users/joewiz/following{/other_user}","gists_url":"https://api.github.com/users/joewiz/gists{/gist_id}","starred_url":"https://api.github.com/users/joewiz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joewiz/subscriptions","organizations_url":"https://api.github.com/users/joewiz/orgs","repos_url":"https://api.github.com/users/joewiz/repos","events_url":"https://api.github.com/users/joewiz/events{/privacy}","received_events_url":"https://api.github.com/users/joewiz/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-09-21T21:15:15Z","updated_at":"2017-09-21T21:15:15Z","closed_at":null,"author_association":"COLLABORATOR","body":"### What is the problem\r\n\r\nAnother arrow operator expression is failing, whereas the non-arrow operator version works. For example, the following expression throws an error:\r\n\r\n```xquery\r\nxquery version \"3.1\";\r\n\r\n(1, 2, 3) => string-join(\"-\")\r\n```\r\n\r\nThe error from eXist:\r\n\r\n> err:XPTY0004 xs:integer(1) is not a sub-type of xs:string\r\n\r\nWhen expressing the query without the arrow operator, eXist does not throw an error:\r\n\r\n```xquery\r\nxquery version \"3.1\";\r\n\r\nstring-join((1, 2, 3), \"-\")\r\n```\r\n\r\nI'm not sure if the underlying problem is some kind of type promotion failure when using the arrow operator? \r\n\r\nAlso, on a possibly related point (?), in version 3.1 of XQuery F&O spec appears changed the function signature for the first parameter of `fn:string-join()`, relaxing it from `xs:string*` to  `xs:anyAtomicType*`. eXist still restricts this parameter to `xs:string*`. See https://www.w3.org/TR/xpath-functions-31/#func-string-join vs. https://www.w3.org/TR/xpath-functions-30/#func-string-join vs. https://www.w3.org/TR/xpath-functions/#func-string-join vs. https://github.com/eXist-db/exist/blob/develop/src/org/exist/xquery/functions/fn/FunStringJoin.java#L58-L60. \r\n\r\n### What did you expect\r\n\r\nThe expected result, as produced correctly by BaseX and Saxon (and by eXist when using the variant of the query without the arrow operator), is \"1-2-3\".\r\n\r\n### Describe how to reproduce or add a test\r\n\r\nSee the sample code above.\r\n\r\n### Context information\r\n\r\n- eXist-db version + Git Revision hash: eXist-db 3.5.0-SNAPSHOT+0875a60cc\r\n- Java version: jdk1.8.0_144\r\n- Operating system: macOS 10.12.6\r\n- 32 or 64 bit: 64 bit\r\n- Any custom changes in e.g. conf.xml: none\r\n"}}
{"actor":{"display_login":"joewiz"}}