-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Fix NRT annotations on XmlProcessingInstruction
#71862
Comments
I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label. |
Tagging subscribers to this area: @dotnet/area-system-xml Issue DetailsDescriptionXmlProcessingInstruction is not annotated correctly? The implementation of Name explicitly accomodates a null target, and its Target is annotated as nullable. The Reproduction StepsNo particular reproduction steps Expected behaviorNo specific behavioural changes should occur, this is just a compile time issue. Actual behaviorNo specific behavioural changes should occur, this is just a compile time issue. Regression?No response Known WorkaroundsNo response ConfigurationNo response Other informationNo response
|
I had to refer spec to figure out correct annotations since current implementation doesn't make it in any way easy. Per https://www.w3.org/TR/2006/REC-xml11-20060816/#sec-pi
|
Description
XmlProcessingInstruction is not annotated correctly. The implementation of Name explicitly accomodates a null target, and its Target is annotated as nullable. The
Value
property, which just returns _data, is annotated as[AllowNull]
but just !s away a null value that's stored, so it can actually return null. Please see this PR comment for more context.Reproduction Steps
No particular reproduction steps
Expected behavior
No specific behavioural changes should occur, this is just a compile time issue.
Actual behavior
No specific behavioural changes should occur, this is just a compile time issue.
Regression?
No response
Known Workarounds
No response
Configuration
No response
Other information
No response
The text was updated successfully, but these errors were encountered: