Nullness issue - nullness in signature file is not considered by implementation and vice versa #18058
Open
1 of 7 tasks
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
Compiler doesn't warn when parameter in signature file is marked as nullable but implementation is non-nullable. Opposite is also true - parameter in signature file can be non-nullable while parameter in implementation is.
I would expect to get a warning at least in first situation. Second case is more of "nice to have" category and reminds of
FS3261: The type X does not support null
.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
9.0.100
Reproducible code snippet and actual behavior
Module1.fsi:
Module1.fs:
Project example
Possible workarounds
.
The text was updated successfully, but these errors were encountered: