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: Variable declarations in match cases, formals do not trigger errors anymore #2910

Merged
merged 7 commits into from
Oct 24, 2022

Conversation

MikaelMayer
Copy link
Member

This PR ensures that, in the case of branch duplication in resolution, exactly one branch reuses the same variables as the original branch (local variable declarations, formals, and bound variables in patterns).

That way, we fix #2905 and moreover fix the previous issue that hovering other variables in match cases was not displaying type information

By submitting this pull request, I confirm that my contribution is made under the terms of the MIT license.

MikaelMayer and others added 2 commits October 21, 2022 13:28
…ors anymore

This PR ensures that, in the case of branch duplication in resolution, exactly one branch reuses the same
variables as the original branch (local variable declarations, formals, and bound variables in patterns).

That way, we fix #2905 and moreover fix the previous issue that hovering other variables in match cases was not displaying type information
Copy link
Member

@cpitclaudel cpitclaudel left a comment

Choose a reason for hiding this comment

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

LGTM! Can you add a test case for the code that used to raise an error?

docs/dev/news/2910.fix Outdated Show resolved Hide resolved
@cpitclaudel cpitclaudel enabled auto-merge (squash) October 24, 2022 15:00
@MikaelMayer MikaelMayer enabled auto-merge (squash) October 24, 2022 15:19
@MikaelMayer MikaelMayer merged commit e46c119 into master Oct 24, 2022
@MikaelMayer MikaelMayer deleted the fix-2905-name-resolution-error branch October 24, 2022 18:34
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.

Name resolution error
2 participants