4.4. Call Expressions

Call expression allows reading / writing variable and properties but also calling operations, super-operations and lambda expressions.

Figure 4.4. 

Call variable / Call result

A Call variable represents a call to an operation parameter, a interpreter variable or a local variable. In any case, the type of this variable might be either a simple type or a function type.

If it is a simple type, the returned value of the expression is the value of the variable: the type of the expression is the type of the variable.

If the type of the variable is a function type then there are two possible behaviour depending on the presence of parameters. In no parameters are supplied then the returned value of the expression is the function but if parameter are provided, the function is applied and the value returned by the expression is the value returned by the function. In that case the return type of the expression is the return type of the function.

Constraints :

SelfExpression

The self expression allow accessing the current instance. The object returned by a self expression is the instance in the context of which the operation is executed. The type of this object can be any type associated with the class definition in which the operation is defined.

Thus the type of a self expression is obtained by binding all type variables of the class to the least derived compatible type. If the type variable has a superType then this superType is used, otherwise the type Object is used.

CallFeature

CallFeature expression allows calling operation and reading/writing features. If no target is specified the self is used.

Returned Type :

Expression

Type

CallVariable

XXX