#1180 Tail calls and FLWOR expressions

v9.4
closed
Michael Kay
5
2012-10-08
2011-12-27
Michael Kay
No

A recursive function call appearing in the return clause of a FLWOR expression is not recognized as a tail call in 9.4.

This is because the special oode in LetExpression to handle static type checking is not activated, because during the type-checking phase the expression on the tree is in the form of a FLWORExpression. In consequence, typc-checking code is not projected down to the branches of a conditional so the tail call is not recognized as such because the result of the function call needs to be checked against the required type.

A patch to class FLWORExpression is being placed in Subversion.

Discussion

  • Michael Kay
    Michael Kay
    2012-01-23

    Fixed in 9.4.0.2