[Bug 29590] dependency cycle and indirect references

https://www.w3.org/Bugs/Public/show_bug.cgi?id=29590

Michael Kay <mike@saxonica.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mike@saxonica.com

--- Comment #1 from Michael Kay <mike@saxonica.com> ---
We very deliberately made cyclicity a dynamic error rather than a static error
to permit this kind of construct. Yes, it's not statically decidable whether
something gets evaluated, but it is dynamically decidable. Evaluating
function-arity(F) does not involve evaluating F (it cannot involve calling F,
because no arguments have been supplied); so the dynamic evaluation of this
query involves no circularity.

By contrast, in function-lookup-613, dynamic evaluation is not possible. Given

        declare variable $v := function-lookup($n, 0)();
        declare function local:return-v() {$v + 1};

we can't evaluate $v without calling local:return-v (note the "()") and we
can't evaluate local:return-v() without evaluating $v.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.

Received on Monday, 25 April 2016 08:24:26 UTC