Skip to content

Fix SemantiDB production of method signature with shadowed parameters #23161

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

MatthieuSLR9
Copy link

@MatthieuSLR9 MatthieuSLR9 commented May 14, 2025

Fixes #23160

The problem was caused by the way we populated the paramRefSymtab in TypeOps.scala.

In #23160 when looking at val x, we will enterParamRef of its owner which is foo. However foo also has a param with name x so it will enter the symbol of the val x in the paramRefSymTab which is incorrect.

We therefore must make sure the symbol is a param to be entered if it's owner was a method.

New test cases were added to confirm the fix.

@MatthieuSLR9 MatthieuSLR9 changed the title Fix production of SemanticDB for shadowed parameters Fix SemantiDB production of method signature with shadowed parameters May 14, 2025
@MatthieuSLR9 MatthieuSLR9 reopened this May 14, 2025
@Gedochao Gedochao requested a review from natsukagami May 15, 2025 06:21
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.

Incorrect SemantiDB production of method signatures with shadowed parameters
2 participants