Fix accidental closure in Regex.Replace#50512
Conversation
And sprinkle some "static" around to help avoid this in the future.
|
Tagging subscribers to this area: @eerhardt, @pgovind Issue DetailsAnd sprinkle some "static" around to help avoid this in the future.
|
| state.segments.Add(state.input.AsMemory(match.Index + match.Length, state.prevat - match.Index - match.Length)); | ||
| state.prevat = match.Index; | ||
| state.segments.Add(evaluator(match).AsMemory()); | ||
| state.segments.Add(state.evaluator(match).AsMemory()); |
There was a problem hiding this comment.
Just curious about how you found this?
There was a problem hiding this comment.
Wednesdays are a busy meeting day for me, and I find my mind is able to stay more focused on them if I give it little mindless side projects, like walking in ILSpy through all "DisplayClass"es in all of netcoreapp looking for ones that don't belong :)
There was a problem hiding this comment.
Next task is to look a dumps all day.
|
The use of "static" is not so obvious. Do you already have an idea to make an analyzer for this? |
And sprinkle some "static" around to help avoid this in the future.