function types syntax
Peter Levart
peter.levart at marand.si
Tue Jan 5 08:30:49 PST 2010
On Tuesday 05 January 2010 17:04:42 Rémi Forax wrote:
> From the JLS3 grammar, an Expression can be a PrimaryNoNewArray that
> can be derived to a parenthesis expression and it can also be a
> CastExpression.
> So cast can appear where parenthesized function call can appear.
Ok, but CastExpression (15.16) is defined as:
CastExpression:
( PrimitiveType Dims opt ) UnaryExpression
( ReferenceType ) UnaryExpressionNotPlusMinus
... so "( ReferenceType )" has to be followed by UnaryExpressionNotPlusMinus to be recognised as CastExpression, whereas "parenthesized function call" (I think) can never be followed by anything that looks like UnaryExpressionNotPlusMinus.
It would be best to find a full contra-example...
>
> Example:
> 2 + (A()) ...
>
What did you have in mind for "..." ?
Regards, Peter
More information about the lambda-dev
mailing list