Class DynamicCaptureOrError

All Implemented Interfaces:
Consumer<EK9Parser.DynamicVariableCaptureContext>

final class DynamicCaptureOrError extends TypedSymbolAccess implements Consumer<EK9Parser.DynamicVariableCaptureContext>
Resolves the variables to be captured and defines new variable symbols against the appropriate scopes.

A NAMED capture '(name: value)' introduces a new variable, so it obeys the same naming rule as every other variable: it may not reuse a function or type name (E01030/E01040). That is checked here, while the capture scope is still open and can see the module's functions and types - once closed, nothing later can (front-end audit FE57). An unnamed capture reuses a name that was already checked where it was declared.