zorba-coders team mailing list archive
-
zorba-coders team
-
Mailing list archive
-
Message #18793
Re: [Merge] lp:~zorba-coders/zorba/hof-merge into lp:zorba
> 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.
References