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 equals operator with split state on right #56321

Merged
merged 1 commit into from
Sep 14, 2021

Conversation

RikkiGibson
Copy link
Contributor

@RikkiGibson RikkiGibson commented Sep 10, 2021

Fixes #56298.

The expectation here is that except for ||/&&, a binary operator where both operands are not constant values and are not conditional accesses does not propagate out any conditional state. The modified code path in this PR is for just such an operator. Before we would actually propagate out conditional state from the right side, which doesn't make sense. The fix is to just use VisitRvalue instead of Visit here.

Nullable doesn't use this code path and an ad-hoc check indicates that there isn't a corresponding bug present in nullable analysis.

Relates to test plan #51463

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 1)

@RikkiGibson RikkiGibson merged commit 96fd5dc into dotnet:main Sep 14, 2021
@RikkiGibson RikkiGibson deleted the ida-is-fix branch September 14, 2021 23:30
@ghost ghost added this to the Next milestone Sep 14, 2021
@Cosifne Cosifne modified the milestones: Next, 17.0.P5 Sep 27, 2021
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.

Missing definite assignment error for complex "is" checks
4 participants