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

Results of running new "use nameof for nullable attributes" analyzer/fixer on roslyn #65733

Merged
merged 1 commit into from
Dec 5, 2022

Conversation

CyrusNajmabadi
Copy link
Member

No description provided.

@CyrusNajmabadi
Copy link
Member Author

@dotnet/roslyn-compiler @dotnet/roslyn-ide ptal.

@@ -1126,7 +1126,7 @@ private BoundLambda ReallyBindForErrorRecovery()
?? rebind(ReallyInferReturnType(delegateType: null, ImmutableArray<TypeWithAnnotations>.Empty, ImmutableArray<RefKind>.Empty));

// Rebind a lambda to push target conversions through the return/result expressions
[return: NotNullIfNotNull("lambda")] BoundLambda? rebind(BoundLambda? lambda)
[return: NotNullIfNotNull(nameof(lambda))] BoundLambda? rebind(BoundLambda? lambda)
Copy link
Member

Choose a reason for hiding this comment

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

❓ What's the scope here if a local variable has the same name?

Copy link
Member Author

@CyrusNajmabadi CyrusNajmabadi Dec 5, 2022

Choose a reason for hiding this comment

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

it's only the parameters that are in scope.

@CyrusNajmabadi
Copy link
Member Author

@jcouv @333fred could i get another set of compiler eyes on this?

@CyrusNajmabadi CyrusNajmabadi merged commit 18f20b4 into dotnet:main Dec 5, 2022
@CyrusNajmabadi CyrusNajmabadi deleted the useNameofInRoslyn branch December 5, 2022 18:42
@ghost ghost added this to the Next milestone Dec 5, 2022
@Cosifne Cosifne modified the milestones: Next, 17.5 P3 Jan 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants