-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Use [NotNullWhenFalse] and [EnsuresNotNull] to drive nullability analysis #26656
Merged
jcouv
merged 18 commits into
dotnet:features/NullableReferenceTypes
from
jcouv:nullable-assert
May 15, 2018
+2,212
−133
Merged
Changes from 13 commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
f35fded
Add well-known Debug.Assert method
jcouv e0ca0e3
Make IsNullOrEmpty well-known
jcouv 8160ab7
Use attributes as annotation
jcouv 9823b66
Fix test regressions
jcouv 967dafa
Implement NotNullWhenFalse and EnsuresNotNull
jcouv 2470a6f
Address PR feedback from Chuck
jcouv 5ae61fa
Add tests for metadata. Fix regression. Use regular, not early, attri…
jcouv 78402d9
Use enum. Annotations win
jcouv 07a9ecd
Diagnostics for invalid usage of attributes
jcouv 84ff12c
Address PR feedback from Chuck
jcouv 4e72481
Block params
jcouv b893f7b
Remove unused parameter
jcouv 2188813
Fix merge conflict
jcouv 7c7573d
WIP
jcouv 2036a25
Remove warning for misused attributes
jcouv aea98d8
Address PR feedback from Aleksey
jcouv fa24db3
Missed change
jcouv 266b24c
Fix comment and add test
jcouv File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't notice where these are used, but I'm not confident it is a good idea to have diagnostics such as this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because of "forward compatibility" scenarios. (Code that compiles with older compilers will fail to compile with newer compilers)
In reply to: 187484195 [](ancestors = 187484195)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the clarification.
Filed #26783 to track compat concern.