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

python code generation has a bug #1181

Closed
johnynek opened this issue Mar 22, 2024 · 0 comments · Fixed by #1183
Closed

python code generation has a bug #1181

johnynek opened this issue Mar 22, 2024 · 0 comments · Fixed by #1183

Comments

@johnynek
Copy link
Owner

see the diff here:

d32020f

this shouldn't change anything: the order we match cases may change efficiency, but it shouldn't change the result in cases like this.

But inspecting the generated python code it is definitely wrong. The bug seems to be with python generation and not the Matchless AST since that is used for the interpretter tests which pass in both cases.

The cmp_BinNat expression is simple enough, but clearly miscompiled when the order isn't starting with Zero.

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 a pull request may close this issue.

1 participant