Project

Profile

Help

Bug #3980

closed

Incorrect type inference for map:merge() function

Added by Michael Kay about 6 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
XPath conformance
Sprint/Milestone:
-
Start date:
2018-10-23
Due date:
% Done:

100%

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

Description

The static type inferencing code incorrectly assumes that the item type of the returned map will be the same as the item type of the supplied sequence of maps. This inference is incorrect in the case where duplicates=combine is specified, because for example merging the maps map{1:'x'} and map{1:'y'} will return the map map{1:('x', 'y')}.

The problem is illustrated in the test stylesheet submitted at https://saxonica.plan.io/boards/3/topics/7338

Actions #1

Updated by Michael Kay about 6 years ago

  • Status changed from New to Resolved
  • Applies to branch 9.8, 9.9 added
  • Fix Committed on Branch 9.8, 9.9 added
Actions #2

Updated by Michael Kay about 6 years ago

Refined the type inferencing in MapMerge.getResultItemType()

Actions #3

Updated by O'Neil Delpratt about 6 years ago

  • % Done changed from 0 to 100
  • Fixed in Maintenance Release 9.8.0.15 added

Bug fix applied in the Saxon 9.8.0.15 maintenance release. Leave open to the Saxon 9.9 maintenance release.

Actions #4

Updated by O'Neil Delpratt about 6 years ago

  • Status changed from Resolved to Closed
  • Fixed in Maintenance Release 9.9.0.2 added

Bug fix applied in the Saxon 9.9.0.2 maintenance release.

Please register to edit this issue

Also available in: Atom PDF