This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
7.2.5 fn:collection and fn:doc Functions & Operators says that the return type of fn:doc is document? . Therefore the static type of fn:doc when the argument is not a statically known document cannot be document, it must be document? . This is a problem in the last two inferences in this section.
Good catch. Fixed as suggested. - Jerome