Class CallableReturnsInitialisedOrError<C extends org.antlr.v4.runtime.ParserRuleContext>
java.lang.Object
org.ek9lang.compiler.common.RuleSupport
org.ek9lang.compiler.common.TypedSymbolAccess
org.ek9lang.compiler.phase5.CallableReturnsInitialisedOrError<C>
- Type Parameters:
C- the callable declaration context this instance is wired to.
- All Implemented Interfaces:
Consumer<C>
final class CallableReturnsInitialisedOrError<C extends org.antlr.v4.runtime.ParserRuleContext>
extends TypedSymbolAccess
implements Consumer<C>
THE shared check that a callable's returning values have been initialised: one class for methods, operators,
service operations and functions (it was four copies, one of which had drifted and dropped two guards).
A callable is checked only when its recorded symbol is of the expected kind - which also excludes programs, whose method declaration records an aggregate - is not abstract, and declares a returning parameter.
-
Field Summary
Fields inherited from class RuleSupport
errorListener, symbolsAndScopes -
Constructor Summary
ConstructorsConstructorDescriptionCallableReturnsInitialisedOrError(SymbolsAndScopes symbolsAndScopes, ErrorListener errorListener, Function<C, EK9Parser.OperationDetailsContext> operationDetailsOf, Class<? extends ISymbol> expectedSymbolKind) -
Method Summary
Methods inherited from class TypedSymbolAccess
emitTypeNotResolvedError, getRecordedAndTypedSymbol, isAlreadyInError, isProcessingScopePure, isPureReassignmentDisallowed, recordATypedSymbol
-
Constructor Details
-
CallableReturnsInitialisedOrError
CallableReturnsInitialisedOrError(SymbolsAndScopes symbolsAndScopes, ErrorListener errorListener, Function<C, EK9Parser.OperationDetailsContext> operationDetailsOf, Class<? extends ISymbol> expectedSymbolKind)
-
-
Method Details
-
accept
-