5.8 Array Access
Array access is expressed by using an opening bracket [ followed by the index expression and a closing bracket ].
expr[indexExpr]
This notation is allowed with arbitrary expressions, but at typing level only certain combinations are admitted:
- expris of- Arrayor- Dynamicand- indexExpris of- Int
- expris an abstract type which defines a matching array access