W3C home > Mailing lists > Public > public-qt-comments@w3.org > December 2006

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

From: <bugzilla@wiggum.w3.org>
Date: Wed, 13 Dec 2006 11:25:56 +0000
CC:
To: public-qt-comments@w3.org
Message-Id: <E1GuSFI-0006Om-Kn@wiggum.w3.org>

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

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:57:16 UTC