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 statement and byte #700

Closed
Akuli opened this issue Jan 26, 2025 · 0 comments · Fixed by #702
Closed

match statement and byte #700

Akuli opened this issue Jan 26, 2025 · 0 comments · Fixed by #702

Comments

@Akuli
Copy link
Owner

Akuli commented Jan 26, 2025

Currently match some_byte: doesn't work, but match some_byte with bytecmp does, where bytecmp is the following function:

# TODO: should not be needed
def bytecmp(a: byte, b: byte) -> int:
    return (a as int) - (b as int)

In fact, the match statement only works with enums if you don't use match ... with syntax.

Discovered in #699

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