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

Avoid redundant warnings from explicit cast #31138

Merged
merged 4 commits into from
Nov 13, 2018
Merged

Conversation

cston
Copy link
Member

@cston cston commented Nov 13, 2018

Fixes #30938.

@cston cston requested a review from a team as a code owner November 13, 2018 15:53
@cston
Copy link
Member Author

cston commented Nov 13, 2018

@dotnet/roslyn-compiler please review.

{
var operandConversion = (BoundConversion)operandOpt;
var explicitType = operandConversion.ConversionGroupOpt.ExplicitType;
if (!explicitType.IsNull && explicitType.Equals(targetTypeWithNullability, TypeCompareKind.ConsiderEverything))
Copy link
Contributor

Choose a reason for hiding this comment

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

ConsiderEverything [](start = 115, length = 18)

Should insignificant annotation differences be ignored for the purpose of this comparison?

Copy link
Member Author

@cston cston Nov 13, 2018

Choose a reason for hiding this comment

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

Yes. Added a test based on the example you described offline. Thanks.

Copy link
Contributor

@AlekseyTs AlekseyTs left a comment

Choose a reason for hiding this comment

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

LGTM (iteration 2)

Copy link
Member

@jcouv jcouv left a comment

Choose a reason for hiding this comment

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

LGTM Thanks (iteration 3)

@jcouv jcouv self-assigned this Nov 13, 2018
@cston
Copy link
Member Author

cston commented Nov 13, 2018

@jaredpar for approval.

@cston cston merged commit 3edd05e into dotnet:dev16.0-preview2 Nov 13, 2018
@cston cston deleted the 30938 branch November 13, 2018 22:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants