← Back to team overview

zorba-coders team mailing list archive

Re: [Merge] lp:~zorba-coders/zorba/bug-1029836 into lp:zorba

 

Hi Matthias,

I think you finally convinced me that it can be seen as a type error, but for a slightly different reason :-)

The spec used to say so indeed, but it is no longer the case. We decided in our e-mail discussion that objects and arrays do no match function types. Did I miss anything while updating the spec, or is any page not up-to-date?

What happens now is that the PostFixExpr grammar construct is overloaded to do either dynamic function calls (in which case arity is involved in type matching) or JSON item selection (always unary). The choice call/selection occurs dynamically based on the type of the base expression. Meaning that if the construct is not unary, it must be a call, and the type of the base expression must match function(*) - which objects and arrays do not.

I have just updated the branch accordingly. The error code now reads JNTY0018.

Thanks for your thorough feedback!

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


References