Skip to content

Circularities: test case VarDecl / K-InternalVariablesWith-17a #74

@michaelhkay

Description

@michaelhkay

This test does:

         declare variable $var := local:func1(); 
         declare function local:func1() { local:func2($var) }; 
         declare function local:func2($arg2) { 1 }; 
         true()

and expects an error because the declarations are circular.

The actual definition of the error, however, says:

If it is discovered, during static analysis or during dynamic evaluation, that such a cycle exists, error [[err:XQDY0054] must be raised.

This rather unusual wording seems to leave open the possibility that if the error is NOT discovered, it need not be reported. So a processor that decides to return true() without reporting the circularity seems to be conformant.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions