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

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

From: <bugzilla@wiggum.w3.org>
Date: Mon, 16 Oct 2006 10:06:30 +0000
CC:
To: public-qt-comments@w3.org
Message-Id: <E1GZPMc-0006pe-Ia@wiggum.w3.org>

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





------- Comment #4 from nick@cbcl.co.uk  2006-10-16 10:06 -------
(In reply to comment #3)
> But decimal is automatically promoted to float in this context. Surely that
> applies to static typing too?
> 
Having compared the XQuery and Formal Semantics spec, I think they describe
different behavior.

The FS 5.15 states: "The function body's type must be a subtype of the expected
return type. If static typing fails, a static type error is raised." I can't
find any reference to promotition for the static typing of function
declarations in the FS.

If you agree I'll re-report this as a bug in the FS.
Received on Monday, 16 October 2006 10:06:37 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 27 March 2012 18:14:45 GMT