-
Notifications
You must be signed in to change notification settings - Fork 5k
Wrong summary for generated regex #114889
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Tagging subscribers to this area: @dotnet/area-system-text-regularexpressions |
@pawchen can you please open an issue here: https://developercommunity.visualstudio.com/VisualStudio?q=regex |
@steveharter I believe the source code for the generated summary is in this repo. |
Yes, the summary is generated by the Regex source generator. /cc @stephentoub |
The problem is here: runtime/src/libraries/System.Text.RegularExpressions/gen/RegexGenerator.Emitter.cs Lines 1839 to 1849 in 29e3af6
The emitter is mutating the regex node tree, for convenience and under the assumption that after this point no one else will be looking at the tree. But the XML comment generator does. |
Description
The summary generated should state it matches the string
if
before the optionaln
, but instead it statesMatch an empty string.
:I examined the generated matching code and it did look for the 'i' then the 'f', so it appears only the summary was wrong.
Reproduction Steps
Expected behavior
summary should be stated correctly
Actual behavior
summary was wrong
Regression?
No response
Known Workarounds
Don't look at it?
Configuration
VS 17.13.6
.NET 9
Other information
No response
The text was updated successfully, but these errors were encountered: