Confusing parser error for scripting error
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Zorba |
Fix Released
|
High
|
Nicolae Brinza |
Bug Description
This query:
declare namespace an = "http://
declare %an:sequential function local:func($a, $b) {
if ($a) then {
();
} else {
if ($b) then {
();
local:
local:
} else {
();
}
}
};
local:func(false(), true())
reports this error:
<...>:4,9: static error [err:XPST0003]: invalid expression: syntax error, unexpected ExprSingle (missing comma "," between expressions?)
This is quite difficult to find as
a) the error message does not seem to be related to the problem and
b) the error location points to line 4 while the problem is in line 9
(Of course in the real example there was a lot more code between the error and the indicated error location).
Changed in zorba: | |
status: | Confirmed → Fix Committed |
Changed in zorba: | |
milestone: | 2.8 → 2.9 |
Changed in zorba: | |
status: | Fix Committed → Fix Released |
Also check the information in bug# 1072644