Project

Profile

Help

Bug #5205

closed

Map → function argument

Added by Christian Grün 8 months ago. Updated 8 months ago.

Status:
Closed
Priority:
Low
Assignee:
Category:
-
Sprint/Milestone:
-
Start date:
2022-01-14
Due date:
% Done:

0%

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

Description

Triggered by a Slack comment (https://app.slack.com/client/T011VK9115Z/C011NLXE4DU/thread/C011NLXE4DU-1641484160.002700):

The following expression returns 1:

declare function local:f($f as function(item()?) as item()) {
  1
};
local:f(map { })

I would have expected XPTY0004, as a map is no instance of function(item()?) as item(), and as the following expression yields an error:

map { } treat as
  function(item()?) as item()

Please register to edit this issue

Also available in: Atom PDF