Skip to content
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

Fix 2.13.9 regression in linting, causing spurious "variable x is never used" warnings #10154

Merged
merged 1 commit into from Sep 26, 2022

Conversation

som-snytt
Copy link
Contributor

The setter can be detected as isVar. Ignore its synthetic parameter.

Fixes scala/bug#12646

The setter can be detected as isVar. Ignore its synthetic parameter.
@scala-jenkins scala-jenkins added this to the 2.13.10 milestone Sep 23, 2022
@som-snytt
Copy link
Contributor Author

For a trait var, the setter can be detected as isVar. It has a synthetic parameter named x$1 with symbol x_= for var x. These accessors are flagged SYNTHESIZE_IMPL_IN_SUBCLASS.

@SethTisue SethTisue added the prio:blocker release blocker (used only by core team, only near release time) label Sep 23, 2022
Copy link
Member

@lrytz lrytz left a comment

Choose a reason for hiding this comment

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

👍 thank you!

@lrytz lrytz merged commit 8f57a00 into scala:2.13.x Sep 26, 2022
@som-snytt som-snytt deleted the issue/12646-unused-local branch September 26, 2022 14:18
@SethTisue SethTisue added release-notes worth highlighting in next release notes and removed prio:blocker release blocker (used only by core team, only near release time) labels Sep 30, 2022
@SethTisue SethTisue changed the title Avoid warning on setter in trait Fix 2.13.9 regression causing spurious "variable x is never used" warnings Oct 8, 2022
@SethTisue SethTisue changed the title Fix 2.13.9 regression causing spurious "variable x is never used" warnings Fix 2.13.9 regression in linting, causing spurious "variable x is never used" warnings Oct 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-notes worth highlighting in next release notes
Projects
None yet
4 participants