Skip to content

fix(parser): fix "Enum member must have initializer." false positive#11265

Merged
Boshen merged 1 commit intomainfrom
05-24-fix_parser_fix_enum_member_must_have_initializer._false_positive
May 24, 2025
Merged

fix(parser): fix "Enum member must have initializer." false positive#11265
Boshen merged 1 commit intomainfrom
05-24-fix_parser_fix_enum_member_must_have_initializer._false_positive

Conversation

@Boshen
Copy link
Member

@Boshen Boshen commented May 24, 2025

when parens are encountered in enum member value.

when parens are encountered in enum member value.
Copilot AI review requested due to automatic review settings May 24, 2025 05:35
@Boshen Boshen requested a review from Dunqing as a code owner May 24, 2025 05:35
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR addresses a false positive error ("Enum member must have initializer.") that occurs when enum member initializers are wrapped in parentheses.

  • Updated the enum member check to unwrap parentheses before matching against a numeric literal.
  • Ensures that expressions wrapped with extra parentheses are correctly recognized as valid initializers.

Copy link
Member Author

Boshen commented May 24, 2025


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • 0-merge - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@codspeed-hq
Copy link

codspeed-hq bot commented May 24, 2025

CodSpeed Instrumentation Performance Report

Merging #11265 will degrade performances by 4.98%

Comparing 05-24-fix_parser_fix_enum_member_must_have_initializer._false_positive (68a5563) with main (2398906)

Summary

❌ 1 regressions
✅ 37 untouched benchmarks

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Benchmarks breakdown

Benchmark BASE HEAD Change
mangler[cal.com.tsx] 2.9 ms 3 ms -4.98%

@Boshen Boshen added the 0-merge Merge with Graphite Merge Queue label May 24, 2025
@Boshen Boshen merged commit c4f8690 into main May 24, 2025
24 checks passed
@Boshen Boshen deleted the 05-24-fix_parser_fix_enum_member_must_have_initializer._false_positive branch May 24, 2025 06:01
Copy link
Member Author

Boshen commented May 24, 2025

Merge activity

  • May 24, 6:05 AM UTC: The merge label '0-merge' was detected. This PR will be added to the Graphite merge queue once it meets the requirements.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

0-merge Merge with Graphite Merge Queue A-semantic Area - Semantic C-bug Category - Bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants