Class CapturedVariables
java.lang.Object
org.ek9lang.compiler.support.CapturedVariables
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.
-
Method Summary
Modifier and TypeMethodDescriptionstatic booleanisCaptureOf(ISymbol candidate, ICanCaptureVariables capturer) True whencandidateis, by identity, one of the variablescapturercaptured.
-
Method Details
-
isCaptureOf
True whencandidateis, by identity, one of the variablescapturercaptured.
-