Class AccessToSymbolOrError
java.lang.Object
org.ek9lang.compiler.common.RuleSupport
org.ek9lang.compiler.common.TypedSymbolAccess
org.ek9lang.compiler.phase3.AccessToSymbolOrError
- All Implemented Interfaces:
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).
-
Field Summary
Fields inherited from class RuleSupport
errorListener, symbolsAndScopes -
Constructor Summary
ConstructorsConstructorDescriptionAccessToSymbolOrError(SymbolsAndScopes symbolsAndScopes, ErrorListener errorListener) -
Method Summary
Methods inherited from class TypedSymbolAccess
emitTypeNotResolvedError, getRecordedAndTypedSymbol, isAlreadyInError, isProcessingScopePure, isPureReassignmentDisallowed, recordATypedSymbol
-
Constructor Details
-
AccessToSymbolOrError
AccessToSymbolOrError(SymbolsAndScopes symbolsAndScopes, ErrorListener errorListener)
-
-
Method Details
-
accept
- Specified by:
acceptin interfaceConsumer<SymbolAccessData>
-