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

Match-case overriding used variable is handled incorrectly #114

Open
felix-hilden opened this issue Sep 14, 2022 · 0 comments
Open

Match-case overriding used variable is handled incorrectly #114

felix-hilden opened this issue Sep 14, 2022 · 0 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@felix-hilden
Copy link
Owner

When implementing match support in #110 I ran into very hard to navigate issues, which led me to introduce two X-fails to the test suite. The problem is:

Match statements reference and assign multiple values simultaneously. This violates our assumptions quite profoundly, since references and assignments are handled entirely sequentially and generating references relies on the value being assigned in "scope". What's more, the whole nested match is "executed" at once.

I experimented with delaying assignments, effectively generating batches. But it was unsuccessful. I suspect to get this to work, we'll have to either change our architecture significantly, or write a custom assignment handler just for match.

@felix-hilden felix-hilden added bug Something isn't working help wanted Extra attention is needed labels Sep 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant