Public bug reported:

E.g., the query below crashes zorba

xquery version "3.0";

declare namespace op = "http://www.zorba-xquery.com/options/features";;
declare namespace f = "http://www.zorba-xquery.com/features";;

declare option op:enable "f:hof";

declare variable $func := function($x){translate($x,
"abcdefghijklmnopqrstuvwxyz", "nopqrstuvwxyzabcdefghijklm")};

declare function local:scramble($x as function(xs:string) as xs:string, $y as 
xs:string) as xs:string {
  $x($y)
};

local:scramble($func, "john")

** Affects: zorba
     Importance: Undecided
     Assignee: Nicolae Brinza (nbrinza)
         Status: New

-- 
You received this bug notification because you are a member of Zorba
Coders, which is the registrant for Zorba.
https://bugs.launchpad.net/bugs/1018333

Title:
  HOFs declared as global variables in the prolog crash Zorba

Status in Zorba - The XQuery Processor:
  New

Bug description:
  E.g., the query below crashes zorba

  xquery version "3.0";

  declare namespace op = "http://www.zorba-xquery.com/options/features";;
  declare namespace f = "http://www.zorba-xquery.com/features";;

  declare option op:enable "f:hof";

  declare variable $func := function($x){translate($x,
  "abcdefghijklmnopqrstuvwxyz", "nopqrstuvwxyzabcdefghijklm")};

  declare function local:scramble($x as function(xs:string) as xs:string, $y as 
xs:string) as xs:string {
    $x($y)
  };

  local:scramble($func, "john")

To manage notifications about this bug go to:
https://bugs.launchpad.net/zorba/+bug/1018333/+subscriptions

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to     : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp

Reply via email to