Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Print the full qualified name of the variable type when the parent of the type has generics #389

Merged
merged 1 commit into from
Oct 26, 2015

Conversation

tdurieux
Copy link
Collaborator

No description provided.

@@ -1891,7 +1891,8 @@ public void visitCtCircularTypeReference(CtCircularTypeReference reference) {

private <T> boolean hasDeclaringTypeWithGenerics(CtTypeReference<T> reference) {
// If current reference use generic types, we don't need this hack.
if (reference.getActualTypeArguments().size() != 0) {
if (reference.getActualTypeArguments().size() != 0
&& reference.getDeclaringType().getActualTypeArguments().size() == 0) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you move this check below this check?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The complete if or just my additional condition?

Copy link
Contributor

Choose a reason for hiding this comment

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

Your additional condition. Potentially, reference.getDeclaringType() can be null.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

No, I cannot. but I can move the complete if

Copy link
Contributor

Choose a reason for hiding this comment

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

Move the complete if.

@tdurieux tdurieux force-pushed the fix-type-with-generic branch from 82bc11b to 404cee2 Compare October 26, 2015 08:50
@GerardPaligot GerardPaligot merged commit 720e3fc into INRIA:master Oct 26, 2015
@tdurieux tdurieux deleted the fix-type-with-generic branch November 23, 2015 15:50
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants