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

Improve detection of constant conditions in conditional expressions #4551

Closed
MaceWindu opened this issue Jun 29, 2024 · 3 comments · Fixed by #4554
Closed

Improve detection of constant conditions in conditional expressions #4551

MaceWindu opened this issue Jun 29, 2024 · 3 comments · Fixed by #4554
Assignees

Comments

@MaceWindu
Copy link
Contributor

Post-#4533 task

E.g. we have test TestConditionalInProjection

where sc != null ? sc.Value : "NeverHappen" will always take true branch, so we don't need to generate CASE expression and could emit only TRUE branch (sc.Value)

@MaceWindu MaceWindu added this to the 6.0.0-preview.2 milestone Jun 29, 2024
@MaceWindu
Copy link
Contributor Author

another test is SelectTests.SelectNullPropagationTest

@MaceWindu
Copy link
Contributor Author

Another interesting case is UpdateTests.UpdateAssociation5
image

@MaceWindu
Copy link
Contributor Author

Fixed by #4554

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

2 participants