[Bug 28494] [QT3TS] step-expr-si-1"

https://www.w3.org/Bugs/Public/show_bug.cgi?id=28494

--- Comment #3 from Michael Kay <mike@saxonica.com> ---
It's very difficult to shut the lid on the "Errors and Optimization" can of
worms...

My interpretation is

(a) you don't need to evaluate an expression if you don't need its value

(b) but if you do evaluate it then you must check that the cardinality of the
result is correct.

In your example $x is not used, so you don't need to evaluate local-return(1),
so you don't need to detect the cardinality error.

FWIW, I'm struggling with very similar issues at the moment where we get
incorrect error handling for the lookup operator X?Y, because we generate some
pretty complex code that's supposed to be equivalent to the semantics of the
operator, and the optimizer then mangles it into code with different error
behaviour.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.

Received on Thursday, 16 April 2015 11:01:15 UTC