[Bug 3830] Static typing of function declarations (K-Function-Prolog)

http://www.w3.org/Bugs/Public/show_bug.cgi?id=3830





------- Comment #7 from frans.englich@telia.com  2006-12-13 11:25 -------
XQuery is inconsistent regarding how the static types are inferred for variable
declarations and function declarations.

If a variable declaration has no type declaration, it is inferred from the
static type of the assignment expression.

If a function declaration has no type declaration, it defaults to item()*.

Many implement the type inferring in function declarations as an optimization,
which is why some pass tests like K-FunctionProlog-18, I guess.

Perhaps the different behaviors should be aligned, just as Mike's suggestion to
align conversion rules for variables. (Yes, this is the wrong place for this.)


Frans

Received on Wednesday, 13 December 2006 11:26:09 UTC