Nullness issue - Spurious nullness warning with flexible type #18056
Labels
Area-Nullness
Issues related to handling of Nullable Reference Types
Bug
Impact-Medium
(Internal MS Team use only) Describes an issue with moderate impact on existing code.
Milestone
Issue description
I get a nullness warning with the following:
Since the dispose function allows null, I do not think a warning should be generated. No warning is generated for a non-flexible type, e.g.:
Choose one or more from the following categories of impact
null
constructs in code not using the checknulls switch.null
,not null
).Operating System
Windows (Default)
What .NET runtime/SDK kind are you seeing the issue on
.NET SDK (.NET Core, .NET 5+)
.NET Runtime/SDK version
net9.0
Reproducible code snippet and actual behavior
No response
Possible workarounds
No response
The text was updated successfully, but these errors were encountered: