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

Allow a default enumerator member in type definition #396

Merged
merged 10 commits into from
Dec 9, 2024
Merged

Allow a default enumerator member in type definition #396

merged 10 commits into from
Dec 9, 2024

Conversation

joente
Copy link
Member

@joente joente commented Dec 9, 2024

Description

Allow a type definition to set a default enumerator value.

For example:

set_type('T', {
  e: 'E{M}`,
});

Where T is a new type, E the enumerator and M a member which we want as the default when not provided.

Implements issue #387.

Type of change

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

  • Added enumerator tests

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • New and existing unit tests pass locally with my changes

@joente joente self-assigned this Dec 9, 2024
@joente joente merged commit d4b7864 into main Dec 9, 2024
1 check passed
@joente joente deleted the enumdef branch December 21, 2024 12:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant