Class ReturnSourceClassifier

java.lang.Object
org.ek9lang.compiler.phase5.ReturnSourceClassifier
All Implemented Interfaces:
BiFunction<MutatedOnlyVariables.ReturningCallable, EK9Parser.ExpressionContext, ReturnSourceKind>

THE return-source classifier: which ReturnSourceKind one source of a callable's returning variable is (with IsFreshValueExpression, which decides ReturnSourceKind.NEW). Hold one; both consumers - ReceiverInteriorReturns and CloseableReturnOrError - read it, so they cannot disagree about a source. Was ReturnSourceKind.of (no-statics lane P2, 2026-10-29).

Classification is purely syntactic over the recorded symbols, and reads other callables' RETAINS marks, so it is evaluated afresh on every pass of the derivation's fixpoint.