Skip to content

fix: Unqualified static method calls should be implicit#3371

Merged
monperrus merged 3 commits into
INRIA:masterfrom
slarse:issue/3370-fix-type-access-qualification
May 18, 2020
Merged

fix: Unqualified static method calls should be implicit#3371
monperrus merged 3 commits into
INRIA:masterfrom
slarse:issue/3370-fix-type-access-qualification

Conversation

@slarse

@slarse slarse commented May 16, 2020

Copy link
Copy Markdown
Collaborator

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

slarse commented May 16, 2020

Copy link
Copy Markdown
Collaborator Author

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
Copy Markdown
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