Actions
Bug #1838
closed![Author: Michael Kay](https://www.gravatar.com/avatar/db6526d63053f09b62e52c2da8b2230a?rating=PG&size=50&default=https%3A%2F%2Fassets.plan.io%2Fimages%2Fdefault_avatar.png)
![Assignee: Michael Kay](https://www.gravatar.com/avatar/db6526d63053f09b62e52c2da8b2230a?rating=PG&size=22&default=https%3A%2F%2Fassets.plan.io%2Fimages%2Fdefault_avatar.png)
XQuery 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