Skip to content

Rename colliding type parameters when translating sigs to RBS - #1017

Open
Hashim1999164 wants to merge 1 commit into
Shopify:mainfrom
Hashim1999164:fix/rbs-type-param-shadowing
Open

Rename colliding type parameters when translating sigs to RBS#1017
Hashim1999164 wants to merge 1 commit into
Shopify:mainfrom
Hashim1999164:fix/rbs-type-param-shadowing

Conversation

@Hashim1999164

@Hashim1999164 Hashim1999164 commented Aug 18, 2026

Copy link
Copy Markdown

Summary

  • RBS type variables shadow constants and class type members that share the same name, so a translated sig can fail to parse or drop a type error
  • When a method type parameter collides with a constant path or class type member in the same signature, rename it before printing the RBS comment

Closes #1012

Test plan

  • bundle exec rake test

@Hashim1999164
Hashim1999164 requested a review from a team as a code owner August 18, 2026 18:44
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.

srb sigs translate: type parameter shadows a type name used in the same signature

1 participant