cyclic dependency of declared variables not detected correctly

Bug #900688 reported by David Graf
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Zorba
Fix Released
High
Markos Zaharioudakis

Bug Description

According to the XQuery 3.0 spec (sentence 'The static context for an initializing expression includes all functions, variables, and namespaces that are declared or imported anywhere in the Prolog, other than the variable being declared.' at http://www.w3.org/TR/xquery-30/#id-variable-declarations), forward references of variables should work. Thus, queries like this should work:

declare variable $y := $x;
declare variable $x := <a/>;

$y

Currently, this throws the error XPST0008.

This implies that circular dependencies have to be detected. Like in

Such forward references can cause circular dependencies like in:

declare variable $x := 3 + $b;
declare variable $b := $x;
$x

This has to cause error XQST0054.

David Graf (davidagraf)
description: updated
David Graf (davidagraf)
description: updated
Changed in zorba:
importance: Undecided → Medium
assignee: nobody → Markos Zaharioudakis (markos-za)
Changed in zorba:
importance: Medium → High
milestone: none → 2.7
Changed in zorba:
status: New → Fix Committed
Chris Hillery (ceejatec)
Changed in zorba:
milestone: 2.7 → 3.0
Chris Hillery (ceejatec)
Changed in zorba:
milestone: 3.0 → 2.7
Changed in zorba:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.