Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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
Development

Successfully merging this pull request may close these issues.

2.13.9 Good code error: x in variable x is never used.
4 participants