Skip to content

cgen: allow constant as enum value - #19193

Merged
spytheman merged 3 commits into
vlang:masterfrom
felipensp:fix_const
Aug 23, 2023
Merged

spytheman merged 3 commits into
vlang:masterfrom
felipensp:fix_const

Conversation

@felipensp

@felipensp felipensp commented Aug 20, 2023 •

Copy link
Copy Markdown
Member

Fix #19115

πŸ€– Generated by Copilot at 065e34e

Fix issue #11176 with enum fields with constant expressions. Resolve the expressions in the checker and use the correct values in the code generation.

πŸ€– Generated by Copilot at 065e34e

@spytheman
spytheman marked this pull request as ready for review August 21, 2023 08:13

@spytheman spytheman left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Good work, just needs a small test.

@spytheman
spytheman marked this pull request as draft August 21, 2023 08:28
@felipensp
felipensp marked this pull request as ready for review August 22, 2023 12:17
@spytheman
spytheman merged commit 5cafdea into vlang:master Aug 23, 2023
Wertzui123 pushed a commit to Wertzui123/v that referenced this pull request Oct 8, 2023
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.

Can't use constants in enum definition

3 participants