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
[Version 9.0] Feature support for nullable attributes carried over from V8 (#1221)
* Restore nullable attributes added in 9
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.
* fix link
* add missing type names
---------
Co-authored-by: Rex Jaeschke <rex@RexJaeschke.com>
Copy file name to clipboardExpand all lines: standard/attributes.md
+43Lines changed: 43 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -853,6 +853,8 @@ The code-analysis attributes are declared in namespace `System.Diagnostics.CodeA
853
853
`MaybeNullWhen` ([§23.5.7.7](attributes.md#23577-the-maybenullwhen-attribute)) | A non-nullable argument may be null when the method returns the specified `bool` value.
854
854
`NotNullWhen` ([§23.5.7.10](attributes.md#235710-the-notnullwhen-attribute)) | A nullable argument won’t be null when the method returns the specified `bool` value.
855
855
`NotNullIfNotNull` ([§23.5.7.9](attributes.md#23579-the-notnullifnotnull-attribute)) | A return value isn’t null if the argument for the specified parameter isn’t null.
856
+
`MemberNotNull` (§membernotnull-attribute) | The listed member won’t be null when the method returns.
857
+
`MemberNotNullWhen` (§membernotnullwhen-attribute) | The listed member won’t be null when the method returns the specified `bool` value.
856
858
`DoesNotReturn` ([§23.5.7.4](attributes.md#23574-the-doesnotreturn-attribute)) | This method never returns.
857
859
`DoesNotReturnIf` ([§23.5.7.5](attributes.md#23575-the-doesnotreturnif-attribute)) | This method never returns if the associated `bool` parameter has the specified value.
858
860
@@ -999,6 +1001,47 @@ Specifies that a non-nullable return value may be null.
0 commit comments