[Bug 5795] Static Typing: CVS: K2-Steps-2, K2-FunctionProlog-14

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





--- Comment #17 from Tim Mills <tim@cbcl.co.uk>  2008-06-27 16:14:04 ---
Frans -

I've looked a little further into why we are returning empty sequence here.

In K2-Steps-2, e[928] ends up being transformed into

fs:item-at($fs:seq, 928)

(see Bug 4841 for details of fs:item-at).

The type checking rule is:

        statEnv |-  QName of func expands to (FS-URI,"item-at")
        statEnv |-  Expr1 : Type1
        --------------------------------------------------------
        statEnv |-  QName(Expr1, Expr2) : prime(Type1) ?

which here is

fs:item-at( something of type none, 928)

prime(none) = none
none? = empty

Therefore it is definitely correct to say that e[928] is empty sequence..

A static typing implementation would be required to raise XPST0005 here (that's
an expected result), but any implementation is free to return () here.

Would this persuade you to add this as a possible result?


-- 
Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

Received on Friday, 27 June 2008 16:14:42 UTC