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

Allow Resolver#findClassInPackage Class kinds beside just CLASS. (Fixes #3018) #3031

Merged
merged 3 commits into from
Jan 6, 2020

Conversation

smillst
Copy link
Member

@smillst smillst commented Jan 3, 2020

Fixes #3018

@@ -282,7 +282,7 @@ public Element findClass(String name, TreePath path) {
pck,
names.fromString(name),
Kinds.KindSelector.TYP);
if (res.getKind() == ElementKind.CLASS) {
if (res.getKind().isClass() || res.getKind().isInterface()) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is fine, but ElementUtils.isClassElement would be shorter and easier to read.

@wmdietl wmdietl assigned smillst and unassigned wmdietl Jan 6, 2020
@smillst smillst merged commit 3063d06 into typetools:master Jan 6, 2020
@smillst smillst deleted the issue3018 branch January 6, 2020 19:10
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.

Suspicious check in Resolver.findClassInPackage
2 participants