You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
These two attributes were mistakenly added in #1191. They were removed in #1218
This PR adds them back into the `draft-v9` branch, where they are valid.
Copy file name to clipboardExpand all lines: standard/attributes.md
+43Lines changed: 43 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -877,6 +877,8 @@ The code-analysis attributes are declared in namespace `System.Diagnostics.CodeA
877
877
`MaybeNullWhen` ([§22.5.7.7](attributes.md#22577-the-maybenullwhen-attribute)) | A non-nullable argument may be null when the method returns the specified `bool` value.
878
878
`NotNullWhen` ([§22.5.7.10](attributes.md#225710-the-notnullwhen-attribute)) | A nullable argument won’t be null when the method returns the specified `bool` value.
879
879
`NotNullIfNotNull` ([§22.5.7.9](attributes.md#22579-the-notnullifnotnull-attribute)) | A return value isn’t null if the argument for the specified parameter isn’t null.
880
+
`MemberNotNull` (§membernotnull-attribute) | The listed member won’t be null when the method returns.
881
+
`MemberNotNullWhen` (§membernotnullwhen-attribute) | The listed member won’t be null when the method returns the specified `bool` value.
880
882
`DoesNotReturn` ([§22.5.7.4](attributes.md#22574-the-doesnotreturn-attribute)) | This method never returns.
881
883
`DoesNotReturnIf` ([§22.5.7.5](attributes.md#22575-the-doesnotreturnif-attribute)) | This method never returns if the associated `bool` parameter has the specified value.
882
884
@@ -1030,6 +1032,47 @@ Specifies that a non-nullable return value may be null.
0 commit comments