Class AccessToSymbolOrError

All Implemented Interfaces:
Consumer<SymbolAccessData>

final class AccessToSymbolOrError extends TypedSymbolAccess implements Consumer<SymbolAccessData>
Check that a symbol can be accessed issues error if not possible.

IsSymbolAccessible is THE access rule (private: only from within the same type; protected: only from within the same type hierarchy; public: anywhere). A check that must report a denial under its own, clearer code (E07835 for collect as T) holds that predicate rather than re-deriving the rule.

This judges a member reached THROUGH a receiver, whose type it is given. A property named with no receiver (a bare name resolved up the scope stack) is judged by CaptureEvaluationScope.deniesAccessTo(ParseTree, ISymbol), by identity, on the same rule: a property is private to the type that declares it, so a sub-type holds none of its super's (D81).