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

UnnecessaryInnerClass: fix false positive with references to function type variables #4738

Merged
merged 1 commit into from Apr 20, 2022

Conversation

t-kameyama
Copy link
Contributor

Fixes #4735

@github-actions github-actions bot added the rules label Apr 20, 2022
Copy link
Member

@BraisGabin BraisGabin 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!!

@BraisGabin BraisGabin merged commit 0695d7e into detekt:main Apr 20, 2022
@t-kameyama t-kameyama deleted the issue_4735 branch April 20, 2022 09:02
@cortinico cortinico added this to the 1.21.0 milestone Apr 24, 2022
schalkms pushed a commit that referenced this pull request May 27, 2022
Add a unit test for a bug in which safe qualified references to a nullable field
in the parent class (i.e. as `?.`) would not be marked as warnings in release
1.20.0. This issue has been inadvertently fixed by
#4738, but adding a unit test will guard
against future regressions.

I was able to confirm this test fails by checking out the 1.20.0 tag and running
the unit test; against that tag the fix was to override the
visitSafeQualifiedExpression() function with the same logic as
visitCallExpression().
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.

False positive on UnnecessaryInnerClass
3 participants