Param nullchecking binding#36247
Merged
fayrose merged 20 commits intodotnet:features/param-nullcheckingfrom Jun 11, 2019
Merged
Param nullchecking binding#36247fayrose merged 20 commits intodotnet:features/param-nullcheckingfrom
fayrose merged 20 commits intodotnet:features/param-nullcheckingfrom
Conversation
added 8 commits
June 7, 2019 11:19
Contributor
Author
|
Currently adding asserts for IsNullChecked. |
RikkiGibson
reviewed
Jun 7, 2019
RikkiGibson
reviewed
Jun 7, 2019
src/Compilers/CSharp/Test/Semantic/Semantics/NullCheckedParameterTests.cs
Show resolved
Hide resolved
RikkiGibson
reviewed
Jun 7, 2019
src/Compilers/CSharp/Test/Semantic/Semantics/NullCheckedParameterTests.cs
Outdated
Show resolved
Hide resolved
agocke
reviewed
Jun 10, 2019
| } | ||
| } | ||
| internal override bool IsNullChecked | ||
| => this.CSharpSyntaxNode.ExclamationToken.Kind() == SyntaxKind.ExclamationToken; |
Member
There was a problem hiding this comment.
Can ExclamationToken be null? Also, I think the standard way of checking if a token is present is to call IsMissing instead of checking the Kind.
Contributor
Author
There was a problem hiding this comment.
I believe it's SyntaxKind.None if there's no token.
Member
There was a problem hiding this comment.
I'm also wondering about when IsMissing is preferred over Kind() == SyntaxKind.None. It seems like IsMissing is mainly for when the token's absence is a syntax error, not when the token is optional.
src/Compilers/CSharp/Portable/Symbols/Source/SourceSimpleParameterSymbol.cs
Outdated
Show resolved
Hide resolved
src/Compilers/CSharp/Test/Semantic/Semantics/NullCheckedParameterTests.cs
Outdated
Show resolved
Hide resolved
src/Compilers/CSharp/Test/Semantic/Semantics/NullCheckedParameterTests.cs
Show resolved
Hide resolved
added 6 commits
June 10, 2019 12:29
RikkiGibson
reviewed
Jun 10, 2019
src/Compilers/CSharp/Test/Semantic/Semantics/NullCheckedParameterTests.cs
Outdated
Show resolved
Hide resolved
RikkiGibson
reviewed
Jun 10, 2019
src/Compilers/CSharp/Portable/Symbols/Source/SourceComplexParameterSymbol.cs
Outdated
Show resolved
Hide resolved
RikkiGibson
reviewed
Jun 10, 2019
src/Compilers/CSharp/Test/Semantic/Semantics/NullCheckedParameterTests.cs
Outdated
Show resolved
Hide resolved
RikkiGibson
approved these changes
Jun 10, 2019
agocke
reviewed
Jun 10, 2019
src/Compilers/CSharp/Test/Semantic/Semantics/NullCheckedParameterTests.cs
Outdated
Show resolved
Hide resolved
src/Compilers/CSharp/Portable/Symbols/Source/SourceSimpleParameterSymbol.cs
Outdated
Show resolved
Hide resolved
src/Compilers/CSharp/Test/Semantic/Semantics/NullCheckedParameterTests.cs
Outdated
Show resolved
Hide resolved
src/Compilers/CSharp/Test/Semantic/Semantics/NullCheckedParameterTests.cs
Outdated
Show resolved
Hide resolved
Member
|
Looks like there some copy/paste errors around the asserts, should be simple to fix up |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Working cases for binding parameter nullchecking.