> 1) Nope, the order is correct. It was incorrect before I have reversed them.
> Here is the judgement from the spec: http://www.w3.org/TR/xquery-30/#id-
> itemtype-subtype
> --
> Bi is function(Ba_1, Ba_2, ... Ba_N) as Br, Ai is function(Aa_1, Aa_2, ...
> Aa_M) as Ar, where N (arity of Bi) equals M (arity of Ai); subtype(Ar, Br);
> for values of I between 1 and N, subtype(Ba_I, Aa_I) ;
> 
> Note:
> 
> Function return types are covariant because this rule invokes subtype(Ar, Br)
> for return types. Function arguments are contravariant because this rule
> invokes subtype(Ba_I, Aa_I) for arguments.
> --

Yes, you are right, my bad. Actually the rules make sense.

Now here are 2 more comments:

1. In typeops.cpp:749, you should not be casting AnyFunctionXQType to 
FunctionXQType.

2. is_equal() has not been implemented for function types. If you think it will 
never be called, then at least put an assertion to make sure that it will 
indeed never be called. 

-- 
https://code.launchpad.net/~zorba-coders/zorba/hof-merge/+merge/151673
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to     : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp

Reply via email to