Skip to content

Conversation

@philberty
Copy link
Member

When we name-resolve generic parameters their declaration gets inserted in
to the upper-most rib on the stack. Then when this is referenced we lookup
the relevant binding starting from the uppermost rib this lead to the 2nd
extern item adding the same binding into the same rib which caused this
clash. To fix this we need to have a seperate rib for each declaration
so as reusing the same names don't clash with each other.

Fixes #1131

When we name-resolve generic parameters their declaration gets inserted in
to the upper-most rib on the stack. Then when this is referenced we lookup
the relevant binding starting from the uppermost rib this lead to the 2nd
extern item adding the same binding into the same rib which caused this
clash. To fix this we need to have a seperate rib for each declaration
so as reusing the same names don't clash with each other.

Fixes #1131
@philberty philberty added the bug label Apr 21, 2022
@philberty philberty added this to the Compiler Intrinsics milestone Apr 21, 2022
@philberty philberty requested a review from CohenArthur April 21, 2022 18:01
Copy link
Member

@CohenArthur CohenArthur left a comment

Choose a reason for hiding this comment

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

LGTM

@philberty
Copy link
Member Author

bors r+

@bors
Copy link
Contributor

bors bot commented Apr 22, 2022

Build succeeded:

@bors bors bot merged commit f0b6dca into master Apr 22, 2022
@philberty philberty deleted the phil/redefined-bug branch April 22, 2022 13:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

"error: generic param redefined multiple times" when trying to use the same generic param multiple times in the same extern block

3 participants