Skip to content

Conversation

@simeonschaub
Copy link
Member

Reverts #43142

Unfortunately, this introduced regressions in some other cases, so let's revert that for now.

Fixes #43224

@simeonschaub simeonschaub added regression Regression in behavior compared to a previous version compiler:lowering Syntax lowering (compiler front end, 2nd stage) merge me PR is reviewed. Merge when all tests are passing labels Dec 2, 2021
@simeonschaub simeonschaub requested a review from aviatesk December 2, 2021 05:04
Copy link
Member

@aviatesk aviatesk left a comment

Choose a reason for hiding this comment

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

When comparing !(a || b) (#43224) and !(a && b) (#43130), (a && b) || return can be manually transformed into a || return; b || return to get ideal inferrability, but (a || b) || return can't be transformed that way.
So for now we prefer the !(a || b) pattern to be functional.

We'd like to add some special case in frontend in the future so that it can generate constraint-propagatable code for !(a && b) pattern as we do for !(a || b).

@aviatesk aviatesk merged commit 26d2e19 into master Dec 2, 2021
@aviatesk aviatesk deleted the revert-43142-sds/or_constraints branch December 2, 2021 07:17
@DilumAluthge DilumAluthge removed the merge me PR is reviewed. Merge when all tests are passing label Dec 4, 2021
LilithHafner pushed a commit to LilithHafner/julia that referenced this pull request Feb 22, 2022
LilithHafner pushed a commit to LilithHafner/julia that referenced this pull request Mar 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

compiler:lowering Syntax lowering (compiler front end, 2nd stage) regression Regression in behavior compared to a previous version

Projects

None yet

Development

Successfully merging this pull request may close these issues.

inference: regression on constraint propagation with !(a || b) pattern

4 participants