-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Implement -Xlint:private-shadow, type-parameter-shadow #17622
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
Merged
szymon-rd
merged 13 commits into
scala:main
from
schuetzcarl:implement/Xlint/shadow_warnings
Sep 29, 2023
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
e5fd477
Implement -Xlint:private-shadow, type-parameter-shadow
schuetzcarl 1f15b29
Move out miniphase
schuetzcarl 175d4f3
Fix Exception in CheckUnused isOverriden() helper
schuetzcarl 07f6581
Warn instead of fail for invalid -Xlint args
schuetzcarl 10c9af0
Merge branch 'main' into implement/Xlint/shadow_warnings
schuetzcarl 297183c
Lint MegaPhase after ExtractSemanticDB
schuetzcarl 46f2db6
Adjust export and synth. case class constructor false-positive cases …
schuetzcarl fb8426a
Move tests from neg-custom-args/fatal-warnings to neg
schuetzcarl 2edd869
Delete tests in old folder
schuetzcarl da5d244
Merge branch 'main' into implement/Xlint/shadow_warnings
schuetzcarl 1db2afb
Change options line for tests/neg folder
schuetzcarl e3c984e
Apply review changes
schuetzcarl 0f4f7bf
Separate CheckUnused and CheckShadowing into two MegaPhases
schuetzcarl File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Surely we can merge this miniphase with other mini phases?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that's the plan for linting. But a weird bug appeared when we did that, and we could not diagnose and fix it in a short time frame. I've planned to investigate that, but this version was tested, and we decided to go iteratively while not blocking this feature from releasing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Especially given that a megaphase seems to be a no-op when it is not enabled (isRunnable == false) - it does not introduce much cost.
(https://github.com/lampepfl/dotty/blob/main/compiler/src/dotty/tools/dotc/Run.scala#L242)