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

Please register to edit this issue

Also available in: Atom PDF