This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 21832 - FOTS test case extvardef-006b in prod-VarDefaultValue should not raise an error
Summary: FOTS test case extvardef-006b in prod-VarDefaultValue should not raise an error
Status: RESOLVED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: XQuery 3 & XPath 3 Test Suite (show other bugs)
Version: Working drafts
Hardware: PC Linux
: P2 normal
Target Milestone: ---
Assignee: O'Neil Delpratt
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-04-25 21:29 UTC by Markos Zaharioudakis
Modified: 2013-04-25 23:18 UTC (History)
1 user (show)

See Also:


Attachments

Description Markos Zaharioudakis 2013-04-25 21:29:19 UTC
I don't understand why XPTY0004 should be raised here. The declared type of the external variable $ext is xs:integer, and the value 862 assigned to this variable is an instance of xs:integer. The fact that the default value for $ext is a node should not matter.
Comment 1 Michael Kay 2013-04-25 23:18:50 UTC
A processor is certainly allowed to raise a type error here during static analysis (the inferred type of the initializer doesn't match the required type of the variable) but I agree that it isn't required to detect this during static analysis and that if it doesn't, the query will run successfully. So there should be an alternative result. Which I have added.