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

bug: CtTypeReference for a non-generic type is filled with type parameters #3733

Closed
sibwaf opened this issue Dec 17, 2020 · 1 comment · Fixed by #3865
Closed

bug: CtTypeReference for a non-generic type is filled with type parameters #3733

sibwaf opened this issue Dec 17, 2020 · 1 comment · Fixed by #3865

Comments

@sibwaf
Copy link
Contributor

sibwaf commented Dec 17, 2020

Calling CtExecutable#getExecutableDeclaration() somehow manages to add a type parameter to the java.lang.Object type reference in a TypeFactory. And, well, java.lang.Object shouldn't have any generics.

This problem could be somehow connected to this line (contexts.peek() happens to be the said type reference), but I'm not too sure. Further investigation is a bit too much for me, sorry.

Code to reproduce. Just import the Gradle project and launch Main class. To get the stacktrace put a breakpoint on the System.out.println("Type parameters before ...");.
The used Spoon version is 8.4.0-beta-8, but it's reproducible at least since this commit.

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 a pull request may close this issue.

2 participants