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

Merging classes with nested classes fails with "Cannot compute access path" if anonymous package is used #76

Open
slarse opened this issue Mar 22, 2020 · 1 comment
Labels
bug Something isn't working wontfix This will not be worked on

Comments

@slarse
Copy link
Collaborator

slarse commented Mar 22, 2020

Always, a SpoonException like this is thrown:

spoon.SpoonException: Cannot compute access path to type: Cls$CustomException in context of type: Cls
@slarse slarse added bug Something isn't working wontfix This will not be worked on labels Mar 22, 2020
@slarse
Copy link
Collaborator Author

slarse commented Mar 22, 2020

The above exception seems to always be cast if there is no package statement in the file. For example, this crashes:

class Cls {
    private static class Nested {}

    public static void main(String[] args) {
        Nested nested;
    }
}

But this does not:

package pkg;

class Cls {
    private static class Nested {}

    public static void main(String[] args) {
        Nested nested;
    }
}

As all code in practice is packaged, I will probably not fix this.

@slarse slarse changed the title Merging classes with nested classes fails with "Cannot compute access path" Merging classes with nested classes fails with "Cannot compute access path" if anonymous package is used Mar 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

1 participant