Skip to content

Conversation

@gabe565
Copy link
Contributor

@gabe565 gabe565 commented Oct 11, 2024

This is one of my two solutions to fix #40.

Split _typeNameToValueMap into _typeNameToValueMap and _typeLowerNameToValueMap.

  • _typeNameToValueMap is checked first with a fallback to the lower-cased map. This lets the current case-insensitivity behavior stay the same, while also choosing the correct value if there are overlaps.
  • This route seems like a safer option since users don't need to be aware of a flag, but code will be slightly different after people update enumer. Is that ok?
  • Unfortunately, the golden files will all need to be updated if we go this route. Is there are way to re-generate them? (Used the golden test to regenerate).

Fixes #40

@gabe565 gabe565 force-pushed the split-lower-value-map branch from b25a89e to 71aa571 Compare October 11, 2024 06:57
@gabe565 gabe565 changed the title feat: Move lower-cased names to a separate map to improve case support feat: Move lower-cased names to a separate map to fix overlapping cases Oct 11, 2024
@gabe565 gabe565 force-pushed the split-lower-value-map branch from 71aa571 to 5a3855d Compare October 11, 2024 06:58
@gabe565 gabe565 changed the title feat: Move lower-cased names to a separate map to fix overlapping cases fix: Move lower-cased names to a separate map to fix overlapping cases Oct 11, 2024
@gabe565 gabe565 force-pushed the split-lower-value-map branch from 5a3855d to 34ad3cd Compare October 11, 2024 06:59
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 this pull request may close these issues.

Flag for case sensitive in <Type>String(s string)

1 participant