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 generation of negative enum fields #258

Merged
merged 4 commits into from
Nov 7, 2024

Conversation

riz0id
Copy link
Collaborator

@riz0id riz0id commented Nov 6, 2024

Fixes an issue where enums with negative field numbers were compiled to the field's conjugate in toProtoEnumMay pattern matches.

@riz0id riz0id added the bug label Nov 6, 2024
@riz0id riz0id requested a review from j6carey November 6, 2024 16:21
@riz0id riz0id self-assigned this Nov 6, 2024
riz0id and others added 3 commits November 6, 2024 13:07
Integer literal expressions also needed fixing,
not just integer literal patterns.

This commit also adds tests of negative enum codes
based on interoperability with generated Python.
@j6carey j6carey merged commit 8d2d17e into master Nov 7, 2024
84 checks passed
@j6carey j6carey deleted the riz0id/fix/compile-negative-enums branch November 7, 2024 22:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants