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: Unqualified static method calls should be implicit #3371

Merged

Conversation

slarse
Copy link
Collaborator

@slarse slarse commented May 16, 2020

Fix #3370

This is a suggestion for solving #3370. It is a unified solution for both this and #3363 , as the fix I implement for the latter in #3364 was apparently only a partial solution to the problem.

I decided to add the setImplicitPackageOrDeclaringType to complement setPackageOrDeclaringType as the latter seems to be used in places where it's not obvious that the package/declaring type should be implicit. But in this particular case, we know we want it to be implicit as the createTypeAccessNoClasspath(SingleNameReference) is called with a SingleNameReference (i.e. not qualified).

@slarse
Copy link
Collaborator Author

slarse commented May 16, 2020

Ugh, sorry, promise to start running checkstyle before I open a PR :)

@monperrus monperrus changed the title review: fix: Fix unqualified static method call becoming explicitly qualified fix: Unqualified static method calls should be implicit May 18, 2020
@monperrus monperrus merged commit 8498c0e into INRIA:master May 18, 2020
@monperrus
Copy link
Collaborator

Thanks a lot!

@slarse slarse deleted the issue/3370-fix-type-access-qualification branch May 28, 2021 10:07
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.

bug: Unqualified type access becomes fully qualified in some circumstances (noclasspath)
2 participants