Class ObjectAccessExpressionValidOrError

All Implemented Interfaces:
Consumer<EK9Parser.ObjectAccessExpressionContext>

final class ObjectAccessExpressionValidOrError extends TypedSymbolAccess implements Consumer<EK9Parser.ObjectAccessExpressionContext>
In the case of specific variables of type like 'Result' and 'Optional' it is important to check if the method being called needs a previous call to isOk or isError or just '?' before accessing specific methods. This is a bit gnarly - because the method chaining calls are recursive by nature and also this needs to check that any returning type might be a Result or Optional and then also test if the methods that are being called are ones that need safe access calls before being called. i.e. Result.ok(), Result.error(), Optional.get(). Other methods can just be called but those require a safety check call of isOk()/'?', isError() or '?' (for Optional).