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

[Bug 3841] Static typing of function declarations

From: <bugzilla@wiggum.w3.org>
Date: Thu, 02 Nov 2006 18:41:53 +0000
CC:
To: public-qt-comments@w3.org
Message-Id: <E1GfhVh-0004pX-SD@wiggum.w3.org>

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





------- Comment #4 from simeon@us.ibm.com  2006-11-02 18:41 -------
I think that is correct, we should add the type promotion in the static typing
rule in 5.15. Something as follows:

statEnv  |-  VarName1 of var expands to Variable1
...
statEnv  |-  VarNamen of var expands to Variablen
statEnv + varType( Variable1 => Type1 ;...; Variablen => Typen )  |-  Expr :
Type
***** statEnv  |-  Type can be promoted to Typer
---------------------------------------------------------------------------------
statEnv |-  function declaration declare function QName ($VarName1 as
SequenceType1, ยทยทยท, $VarNamen as SequenceTypen) as SequenceTyper { Expr }
with signature declare function expanded-QName(Type1, ..., Typen) as Typer :
Typer

Where line ***** replaces 
statEnv |-  Type <: Typer

- Jerome
Received on Thursday, 2 November 2006 18:43:54 UTC

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