Class ExceptionNotCloseableOrError
java.lang.Object
org.ek9lang.compiler.common.RuleSupport
org.ek9lang.compiler.common.TypedSymbolAccess
org.ek9lang.compiler.phase5.ExceptionNotCloseableOrError
- All Implemented Interfaces:
Consumer<org.antlr.v4.runtime.tree.ParseTree>
final class ExceptionNotCloseableOrError
extends TypedSymbolAccess
implements Consumer<org.antlr.v4.runtime.tree.ParseTree>
THE rule that an Exception, or any sub-type of one, has no
operator close (E81074, Steve 2026-10-26,
decision (b) of the closeables lane): an exception is a VALUE carried to a handler, not a resource. A thrown
exception has no try that owns it and a catch is not an owner, so a close declared on one ran never - it was
thrown, caught, and left open.
It is asked of every class and says an Exception sub-type is closeable when HasCloseOperator says its type
is: a close it writes, one it defaults (default operator close, for a closeable property it holds) and one
it inherits - from a trait it takes (with trait of Closer, whose abstract close it must implement) or from
a super that is itself an Exception. Reported ONCE down a hierarchy, on the first type that is closeable, so the
sub-types of a faulty exception do not repeat the fault.
-
Field Summary
Fields inherited from class RuleSupport
errorListener, symbolsAndScopes -
Constructor Summary
ConstructorsConstructorDescriptionExceptionNotCloseableOrError(SymbolsAndScopes symbolsAndScopes, ErrorListener errorListener) -
Method Summary
Methods inherited from class TypedSymbolAccess
emitTypeNotResolvedError, getRecordedAndTypedSymbol, isAlreadyInError, isProcessingScopePure, isPureReassignmentDisallowed, recordATypedSymbol
-
Constructor Details
-
ExceptionNotCloseableOrError
ExceptionNotCloseableOrError(SymbolsAndScopes symbolsAndScopes, ErrorListener errorListener)
-
-
Method Details
-
accept
-