Online Manual: Locals-related Expressions

Invoking a local method is achieved by the ::m(e1, ..., en) expression, where m is the local method name defined in the enclosing classage where the expression is in. Reading from a local field is achieved by the ::f expression, where f is the local field name. Writing to a local field is achieved by the ::f = e statement. Here is an example to show its basic uses. It implements the Fibonacci function with recursive method calls.

Typechecking of local method invocation and local field access is totally predictable. This example shows various cases where the program does not typecheck.