Actions
Bug #1771
closedTypeCheck bypassed by optimizer
Start date:
2013-05-10
Due date:
% Done:
100%
Estimated time:
Legacy ID:
Applies to branch:
Fix Committed on Branch:
Fixed in Maintenance Release:
Platforms:
Description
In the following test case it returns an empty sequence, but it should be an error:
The reason is the optimizer is trying to be too clever, it is bypassing a typecheck i nthe step.
Updated by Community Admin almost 11 years ago
- Category set to Internals
- Status changed from New to Resolved
- % Done changed from 0 to 100
<test-case name="cbcl-treat-as-021">
<description> test treat as cardinality checks are correct </description>
<created by="Tim Mills" on="2008-09-19"/>
<dependency type="spec" value="XQ10+"/>
<test>
declare function local:range($arg as xs:integer) as xs:integer* { 1 to $arg };
declare function local:double($arg as xs:integer+) { for $a in $arg return $a * 2 };
local:double(local:range(0) treat as xs:integer+)</test>
<result>
<error code="XPDY0050"/>
</result>
</test-case>
Bug fixed and committed to subversion. Made change to the optimizer in CardinalityChecker to special case a Literal expression.
Updated by O'Neil Delpratt almost 11 years ago
- Status changed from Resolved to Closed
- Fixed in version set to 9.5.0.2
Please register to edit this issue
Actions