Skip to content

Addresses wrong results issue described in #48 #178

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

Merged
merged 8 commits into from
Oct 27, 2021

Conversation

alex-kulakov
Copy link
Contributor

Resolves #48

Basically it adds checks for Entity/Structure constants where it should be checked and this prevents wrong results

@AlexUstinov
Copy link
Contributor

Does it make sense to test more complex cases like

.Select( a => a.Author ?? a.NoAuthor ?? nullAuthor)
// -or-
.Select( a => a.Author ?? nullAuthor ?? a.NoAuthor)

And the same for the ternary operator. And the ternary operator can have some other condition rather than null comparison. At least it would help to avoid IDE warnings.

@alex-kulakov
Copy link
Contributor Author

alex-kulakov commented Oct 22, 2021

Does it make sense to test more complex cases like

.Select( a => a.Author ?? a.NoAuthor ?? nullAuthor)
// -or-
.Select( a => a.Author ?? nullAuthor ?? a.NoAuthor)

And the same for the ternary operator. And the ternary operator can have some other condition rather than null comparison. At least it would help to avoid IDE warnings.

Such complex test cases do make sense, I'll add it. Speaking of null comparison I just used most common one, it does not matter since root of the issue is a local entity/structure.

@alex-kulakov alex-kulakov merged commit 8c613bd into 6.0 Oct 27, 2021
@alex-kulakov alex-kulakov deleted the 6.0-coalesce-wrong-results branch October 27, 2021 05:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants