Class InstructionBlockVariablesOrError
- All Implemented Interfaces:
Consumer<EK9Parser.InstructionBlockContext>
One verdict is DEFERRED to PRE_IR_CHECKS (E08090, item 5): a variable initialised by a CALL whose later uses are
only in-place mutations (view <- config.get("server"); view :~: overrides). The call may have handed back
a view of something that IS read later, and then mutating it is a use - which only the callee's RETAINS can say,
and for a user method or function that is derived in phase 5. A coalescing or ternary result
(second ?: other) is deferred the same way: it IS one of its operands; and so is a plain alias
(alias <- second), which IS the object it names. The shapes are
ObjectSharing.mayBeExistingObjectByShape(EK9Parser.ExpressionContext, Function); phase 5 judges them by ObjectSharing.mayBeExistingObject(EK9Parser.ExpressionContext, Function).
Anything clearly fresh (a literal, a constructor, a constant, a declaration without an initialiser, a function
reference) and anything re-pointed keeps today's verdict here.
-
Field Summary
Fields inherited from class RuleSupport
errorListener, symbolsAndScopes -
Constructor Summary
ConstructorsConstructorDescriptionInstructionBlockVariablesOrError(SymbolsAndScopes symbolsAndScopes, ErrorListener errorListener) Check on references to variables in blocks. -
Method Summary
Methods inherited from class TypedSymbolAccess
emitTypeNotResolvedError, getRecordedAndTypedSymbol, isAlreadyInError, isProcessingScopePure, isPureReassignmentDisallowed, recordATypedSymbol
-
Constructor Details
-
InstructionBlockVariablesOrError
InstructionBlockVariablesOrError(SymbolsAndScopes symbolsAndScopes, ErrorListener errorListener) Check on references to variables in blocks.
-
-
Method Details
-
accept
- Specified by:
acceptin interfaceConsumer<EK9Parser.InstructionBlockContext>
-