Project

Profile

Help

Bug #3245

closed

Incorrect type inference for ListCastableFunction

Added by Michael Kay almost 7 years ago. Updated almost 7 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
XPath conformance
Sprint/Milestone:
-
Start date:
2017-06-06
Due date:
% Done:

100%

Estimated time:
Legacy ID:
Applies to branch:
9.7, trunk
Fix Committed on Branch:
9.7, trunk
Fixed in Maintenance Release:
Platforms:

Description

An expression of the form (X castable as xs:ENTITIES) where xs:ENTITIES is a list type is compiled into a call on ListCastableFunction. The return type of this function is incorrect: in this case it is xs:ENTITY* rather than xs:boolean.

This causes a failure on the qt3 -> xslt3 conversion of test cbcl-castable-ENTITIES-001.xsl:

Warning at char 21 in xsl:when/@test on line 17 column 66 of cbcl-castable-ENTITIES-001.xsl:
  SXWN9000: In {$result = true()}: cannot compare xs:ENTITY to xs:boolean. The comparison
  can succeed only if the first operand is empty, and in that case will always be false
Static error on line 1 at column 9 in xsl:variable/@select on line 15 column 99 of cbcl-castable-ENTITIES-001.xsl:
  XPTY0004: Required item type of value of variable $result is xs:ENTITY; supplied value has
  item type xs:boolean

Please register to edit this issue

Also available in: Atom PDF