Actions
Bug #1838
closedXQuery parsing bug: incorrect function declaration syntax is accepted
Start date:
2013-07-07
Due date:
% Done:
100%
Estimated time:
Legacy ID:
Applies to branch:
Fix Committed on Branch:
Fixed in Maintenance Release:
Platforms:
Description
Reported on the help forum on this site today by Nikolay Ognyanov
The XQuery compiler accepts a comma after the last parameter in function declarations. Here is an example which compiles and runs under Saxon-PE 9.5.0.2 :
xquery version "1.0";
declare function local:foo($a,)
{
$a
};
local:foo(1)
The parameter list is defined as
ParamList ::= Param ("," Param)*
So this is clearly a bug albeit a minor one.
Please register to edit this issue
Actions