Closed
Description
Currently Regex.Match
element accessors are implemented this way:
/// Lookup a capture by name or number
public subscript<T>(dynamicMember keyPath: KeyPath<Output, T>) -> T {
output[keyPath: keyPath]
}
// Allows `.0` when `Match` is not a tuple.
@_disfavoredOverload
public subscript(
dynamicMember keyPath: KeyPath<(Output, _doNotUse: ()), Output>
) -> Output {
output
}
This is not correct as we should not materialize the entire output.
Metadata
Metadata
Assignees
Labels
No labels