Skip to content
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

Fix nullable annotations #51522

Merged
merged 1 commit into from
Feb 26, 2021
Merged

Fix nullable annotations #51522

merged 1 commit into from
Feb 26, 2021

Conversation

333fred
Copy link
Member

@333fred 333fred commented Feb 26, 2021

Noticed a couple of incorrect nullable annotations when looking through local rewriter code. This fixes them up.

(cherry picked from commit 336036ee4dc30484c54fd345314fd10d2e3d1f06)
@@ -96,7 +96,7 @@ private set
internal BoundExpression MakeInvocationExpression(
BinderFlags flags,
SyntaxNode node,
BoundExpression? receiver,
BoundExpression receiver,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MakeInvocationExpression below, which is called unconditionally, asserts that the receiver should not be null. We weren't using this incorrectly anywhere that I can see, but the current annotation is still a bug.

@333fred
Copy link
Member Author

333fred commented Feb 26, 2021

@dotnet/roslyn-compiler for a quick review.

@jcouv jcouv added the Concept-Null Annotations The issue involves annotating an API for nullable reference types label Feb 26, 2021
@jcouv jcouv self-assigned this Feb 26, 2021
@333fred 333fred merged commit 833c4e8 into dotnet:master Feb 26, 2021
@333fred 333fred deleted the fix-annotations branch February 26, 2021 23:43
@ghost ghost added this to the Next milestone Feb 26, 2021
@allisonchou allisonchou modified the milestones: Next, 16.10.P2 Mar 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Compilers Concept-Null Annotations The issue involves annotating an API for nullable reference types
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants