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" a regression in the 5.2 merge #3004

Merged
merged 2 commits into from
Sep 20, 2024
Merged

Conversation

ccasin
Copy link
Contributor

@ccasin ccasin commented Sep 2, 2024

This adds a test that newly fails on the 5.2 branch, and a fix, in two commits.

The test passes upstream and seems fine, so I think this is a regression in the merge. But I don't think the fix here (restoring a piece of the previous implementation of checking Pexp_constraints in typecore) is correct. I'm just posting this so @mshinwell can use it to make more progress and so I can point to it for discussion.

What is happening is that loosen_arrow_modes in type_argument is updating the scope of the type, and the fact that the previous implementation was throwing away the old type meant we ignored that. That seems wrong, instead, I think type_argument shouldn't need to use the equation for mode checking in this example, and so this program typechecks in 5.1 for the wrong reason.

Will discuss with modes people.

Copy link
Collaborator

@lpw25 lpw25 left a comment

Choose a reason for hiding this comment

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

LGTM

@mshinwell mshinwell merged commit 8db5026 into merge-5.2 Sep 20, 2024
1 of 16 checks passed
@mshinwell mshinwell deleted the modes-scope-escape-52 branch September 20, 2024 09:06
mshinwell pushed a commit that referenced this pull request Sep 20, 2024
* add failing test

* "fix" by restoring old behavior

(cherry picked from commit 8db5026)
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