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

Import of an inner class in a class package #114

Closed
GerardPaligot opened this issue Nov 27, 2014 · 1 comment
Closed

Import of an inner class in a class package #114

GerardPaligot opened this issue Nov 27, 2014 · 1 comment

Comments

@GerardPaligot
Copy link
Contributor

I found a new bug with imports of inner classes in a specific case.

We have 3 classes :

The first one is a super class with an inner class protected and with a visibility package.

class SuperClass {
    protected class InnerClassProtected {
    }
}

The second is a child class which extends the SuperClass.

public class ChildClass extends SuperClass {
}

And the third is a "client" class which extends the child class and with an inner class which extends the inner class (InnerClassProtected) of the SuperClass class.

public class ClientClass extends ChildClass {
    private class InnerClass extends InnerClassProtected {
    }
}

The last class works when the import of the InnerClassProtected is spoon.test.imports.testclasses.internal.ChildClass but spoon generates the output below:

public class ClientClass extends spoon.test.imports.testclasses.internal.ChildClass {
    private class InnerClass extends spoon.test.imports.testclasses.internal.SuperClass.InnerClassProtected {    }
}

The visibility of SuperClass is package so ClientClass can't access to the InnerClassProtected.

@petitpre petitpre reopened this Feb 4, 2015
@GerardPaligot
Copy link
Contributor Author

I re-open this issue. I still encountered this bug in the open source project Bukkit. The fixe works but not in all cases.

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

No branches or pull requests

2 participants