undeclared variable in built-in module if called through invoke

Bug #917923 reported by Matthias Brantner
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Zorba
Fix Released
Critical
Markos Zaharioudakis

Bug Description

[err:XPDY0002]: "r:foo": undeclared variable is raised for the following scenario.

----------------------
A built-in module such as random declares a variable as follows:

declare variable $r:foo := 1;

----------------------
A library module foo declares a variable and accesses $r:foo in a function.

module namespace foo = "http://foo.com/";

import module namespace r = 'http://www.zorba-xquery.com/modules/random';

declare variable $foo:blub := 1;

declare function foo:bar()
{
  $r:foo
};

----------------------
A main module imports the library module foo and invokes the function foo:bar()

import module namespace invoke = 'http://www.zorba-xquery.com/modules/reflection';
import module namespace foo = "http://foo.com/" at "/home/mbrantner/zorba/build/foo.xq";

invoke:invoke-s ( fn:QName ( 'http://foo.com/', 'bar' ) )

Changed in zorba:
status: New → Fix Committed
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.