-
-
Notifications
You must be signed in to change notification settings - Fork 358
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
bug: superInterfaces on shadow type miss actual type arguments #1906
Comments
Excellent!
I'm not sure to understand, what do you mean? |
to make the failing tests in https://github.com/pvojtechovsky/spoon/tree/fixSuperIfaceArgs passing CtTypeReference ifaceRef = factory.Type.get(CtConditionalImpl.class).getSuperInterfaces().get(0); |
Do you mean that the Are you working on this fix? |
yes
no. I do not know this code yet and I silently hope that somebody else might do it ;-) I am actually cleaning new Template matching / generating code.... so we can start review/merging process soon. |
@surli would you have look at this bug with a failing test case? |
I'll look at it on the next days |
cool!
|
Thank you :-) 👍 |
I am refactoring SpoonMetaModel by way it can be created without spoon sources - just using spoon runtime reflection. And I have found this problem. For example CtConditionalImpl is defined like this
but when I get shadow CtClass of CtConditionalImpl, then getSuperInterfaces() returns CtTypeReference without actuall type arguments. So it looks like this
I need that actual type argument on interface references, in ClassTypingContext.
This information was not available until
Class#getAnnotatedInterfaces()
was introduced in Java8. Could you please use that new method to deliver actual type arguments of extended interfaces too?I created a branch with a failing test https://github.com/pvojtechovsky/spoon/tree/fixSuperIfaceArgs
The text was updated successfully, but these errors were encountered: