Sanity check partial function application with default arguments

I found that in some cases we allowed something like the following (assuming there is a context node):

 

let $lang := lang('en', ?)

return $lang()

 

where $lang() defaulted, due to some static pre-evaluation, to the one-argument function of fn:lang. I believe this is an error, is that correct?

 

Likewise, I believe the following is illegal (omitting the default argument in the dynamic function call):

 

let $lang := lang#2

return $lang('en')

 

In other words, I think we are in error and we should not expose this behavior where overloads continue to exist in the function items.

 

Thanks,

Abel 

Received on Friday, 11 September 2015 19:51:51 UTC