Class CapturedVariables
java.lang.Object
org.ek9lang.compiler.support.CapturedVariables
- All Implemented Interfaces:
Function<ICanCaptureVariables, List<ISymbol>>
public final class CapturedVariables
extends Object
implements Function<ICanCaptureVariables, List<ISymbol>>
THE "is this symbol one of the variables a dynamic function or class captured?" - by IDENTITY, never by name. Use
it rather than walking
getCapturedVariables() again.
A capture is the dynamic construct's own copy of an outer value (a constructor argument stored in a private field,
CaptureScope.define), so it is a property FIELD, yet it is not one of the construct's own properties
(OwnProperty): it belongs to the scope that made the construct. Identity matters - a name join would take
an unrelated variable of the same name (an outer local, a property) for the capture; the E08251 check once did.
Shared by E08251 (a capture is shared state) and the lock-identity inference (a capture stands for its outer
variable). Extracted 2026-10-05. The identity test is IsCapturedVariable.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionapply(ICanCaptureVariables capturer) The variablescapturercaptured, in capture order; empty when it captures nothing (every aggregate can capture, only a dynamic one does).
-
Constructor Details
-
CapturedVariables
public CapturedVariables()
-
-
Method Details
-
apply
The variablescapturercaptured, in capture order; empty when it captures nothing (every aggregate can capture, only a dynamic one does).- Specified by:
applyin interfaceFunction<ICanCaptureVariables, List<ISymbol>>
-