Skip to content

Conversation

PARAIPAN9
Copy link
Contributor

Motivation

Fixes #265

Modifications

When handling a negative number, it takes its absolute value and add 'n' before it

Result

Example: "-1" -> "n1"

Test Plan

Ran and passed all the tests

@czechboy0
Copy link
Contributor

Please add a test case for this as well, just to be positive (ha) that it works.

@simonjbeaumont simonjbeaumont changed the title Fixes #265 - Integer backed enums can't handle negative numbers Escape negative numbers in integer-backed enums Sep 15, 2023
Copy link
Contributor

@czechboy0 czechboy0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, thanks!

@czechboy0 czechboy0 merged commit 2b00744 into apple:main Sep 16, 2023
@czechboy0 czechboy0 added the 🔨 semver/patch No public API change. label Sep 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔨 semver/patch No public API change.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Integer backed enums can't handle negative numbers
3 participants