Skip to content

Fix thunk parameter name collision with enum variants - #2009

Merged
copybara-service[bot] merged 1 commit into
mainfrom
test_981248963
Sep 14, 2026
Merged

copybara-service[bot] merged 1 commit into
mainfrom
test_981248963

Conversation

@copybara-service

Copy link
Copy Markdown

Fix thunk parameter name collision with enum variants

When an input parameter to a function has the same name as a variant of
its enum type (e.g., parameter named some, none), rename it to
__param_{i} in thunk generation to prevent identifier resolution
collisions in the generated thunk code.

@copybara-service
copybara-service Bot force-pushed the test_981248963 branch 2 times, most recently from 2c0b1d0 to 9864853 Compare September 14, 2026 22:29
When an input parameter to a function has the same name as a variant of
its enum type (e.g., parameter named `some`, `none`), rename it to
`__param_{i}` in thunk generation to prevent identifier resolution
collisions in the generated thunk code.

PiperOrigin-RevId: 981403689
@copybara-service
copybara-service Bot merged commit ee945cf into main Sep 14, 2026
7 checks passed
@copybara-service
copybara-service Bot deleted the test_981248963 branch September 14, 2026 22:46
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.

1 participant