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 issues with variables in match arm alternatives #5104

Merged
merged 26 commits into from
Sep 22, 2023

Conversation

ironcev
Copy link
Member

@ironcev ironcev commented Sep 10, 2023

Description

This PR fixes three issues related to variables in match arm alternatives:

Closes #5081.
Closes #5082.
Closes #5108.

Demo

image

image

Checklist

  • I have linked to any relevant issues.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have updated the documentation where relevant (API docs, the reference, and the Sway book).
  • I have added tests that prove my fix is effective or that my feature works.
  • I have added (or requested a maintainer to add) the necessary Breaking* or New Feature labels where relevant.
  • I have done my best to ensure that my PR adheres to the Fuel Labs Code Review Standards.
  • I have requested a review from the relevant team or maintainers.

@ironcev ironcev marked this pull request as draft September 10, 2023 15:44
@ironcev
Copy link
Member Author

ironcev commented Sep 10, 2023

This PR builds on top of #5100 so I'll keep it in draft until that one is closed.

@ironcev ironcev self-assigned this Sep 10, 2023
@ironcev ironcev added bug Something isn't working compiler General compiler. Should eventually become more specific as the issue is triaged compiler: frontend Everything to do with type checking, control flow analysis, and everything between parsing and IRgen compiler: ui Mostly compiler messages compiler: static-analysis labels Sep 10, 2023
@ironcev ironcev marked this pull request as ready for review September 11, 2023 11:14
@ironcev ironcev requested review from a team September 11, 2023 11:15
@ironcev ironcev changed the title Ironcev/5081 5082 match arm variables in alternatives Match arm variables in alternatives Sep 11, 2023
@ironcev
Copy link
Member Author

ironcev commented Sep 11, 2023

Back to draft until decision is made on short-circuiting.

@ironcev ironcev marked this pull request as draft September 11, 2023 19:09
@ironcev ironcev marked this pull request as ready for review September 11, 2023 21:45
@ironcev ironcev requested a review from xunilrj September 11, 2023 21:47
@ironcev ironcev marked this pull request as draft September 13, 2023 16:47
@ironcev
Copy link
Member Author

ironcev commented Sep 13, 2023

Back to draft (again 😄 ). I'll put all the remaining work to be done in matcher in this PR.

@ironcev ironcev changed the title Match arm variables in alternatives Fix issues with variables in match arm alternatives Sep 18, 2023
@ironcev ironcev requested a review from a team September 18, 2023 00:22
@ironcev ironcev marked this pull request as ready for review September 18, 2023 00:23
@ironcev ironcev merged commit eb63ae4 into master Sep 22, 2023
@ironcev ironcev deleted the ironcev/5081-5082-match-arm-variables-in-alternatives branch September 22, 2023 08:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working compiler: frontend Everything to do with type checking, control flow analysis, and everything between parsing and IRgen compiler: static-analysis compiler: ui Mostly compiler messages compiler General compiler. Should eventually become more specific as the issue is triaged
Projects
None yet
4 participants