empty() behaves differently on 7.8.2
Hello all, I'm pretty puzzled by the following fact. On version 7.8 the following code returns true() (which btw is what I expect to be right) let $a := () return empty($a) whereas in 7.8.2 it returns false(). Any advice? Thanks, M.
What a catch... Will be fixed as soon as possible [1]. Thanks, Christian [1] https://github.com/BaseXdb/basex/issues/950 On Thu, May 8, 2014 at 11:42 AM, Marco Lettere <marco.lettere@dedalus.eu> wrote:
let $a := () return empty($a)
Just to augment the issue ... declare function local:a($i){ empty($i) }; declare function local:b($i as node()?){ (: or any other type except item() :) empty($i) }; declare function local:c($i as item()?){ empty($i) }; let $ii := () return (local:a(()), empty($ii), local:a($ii), local:b($ii), local:c($ii)) In the basex gui of 7.8.2 the return is "true false false true false". Clueless. M. On 05/08/2014 01:05 PM, Christian Grün wrote:
What a catch... Will be fixed as soon as possible [1].
Thanks, Christian
[1] https://github.com/BaseXdb/basex/issues/950
On Thu, May 8, 2014 at 11:42 AM, Marco Lettere <marco.lettere@dedalus.eu> wrote:
let $a := () return empty($a)
...fixed [1,2]. Thanks, Christian [1] https://github.com/BaseXdb/basex/issues/950 [2] http://files.basex.org/releases/latest On Thu, May 8, 2014 at 1:55 PM, Marco Lettere <marco.lettere@dedalus.eu> wrote:
Just to augment the issue ...
declare function local:a($i){ empty($i) };
declare function local:b($i as node()?){ (: or any other type except item() :) empty($i) };
declare function local:c($i as item()?){ empty($i) };
let $ii := () return (local:a(()), empty($ii), local:a($ii), local:b($ii), local:c($ii))
In the basex gui of 7.8.2 the return is "true false false true false".
Clueless. M.
On 05/08/2014 01:05 PM, Christian Grün wrote:
What a catch... Will be fixed as soon as possible [1].
Thanks, Christian
[1] https://github.com/BaseXdb/basex/issues/950
On Thu, May 8, 2014 at 11:42 AM, Marco Lettere <marco.lettere@dedalus.eu> wrote:
let $a := () return empty($a)
participants (2)
-
Christian Grün -
Marco Lettere