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

feat: Add CtFormalTypeDeclarer.addFormalCtTypeParameterAt #3896

Conversation

slarse
Copy link
Collaborator

@slarse slarse commented Apr 29, 2021

#3884

This PR adds CtFormalTypeDeclarer.addFormalCtTypeParameterAt(int, CtTypeParameter).

I'm not happy with the current implementation, as the code for adding a type parameter in a specific position is duplicated across all implementations of the method. I'm trying out some ideas to reduce this code duplication.

This seems to be a problem for most of the CtFormalTypeDeclarer methods. Since Java doesn't have any kind of support for mixin classes, extracting the functionality is tricky.

We'll deal with the code duplication separately.

This is ready for review! Actually no it isn't saw a typo ... Ok, now it's ready for review!

@slarse slarse changed the title wip: feat: Add CtFormalTypeDeclarer.addFormalCtTypeParameterAt review: feat: Add CtFormalTypeDeclarer.addFormalCtTypeParameterAt May 3, 2021
@slarse slarse changed the title review: feat: Add CtFormalTypeDeclarer.addFormalCtTypeParameterAt wip: feat: Add CtFormalTypeDeclarer.addFormalCtTypeParameterAt May 3, 2021
@slarse slarse changed the title wip: feat: Add CtFormalTypeDeclarer.addFormalCtTypeParameterAt review: feat: Add CtFormalTypeDeclarer.addFormalCtTypeParameterAt May 4, 2021
@monperrus monperrus changed the title review: feat: Add CtFormalTypeDeclarer.addFormalCtTypeParameterAt feat: Add CtFormalTypeDeclarer.addFormalCtTypeParameterAt May 4, 2021
@monperrus monperrus merged commit a38c1b4 into INRIA:master May 4, 2021
@monperrus
Copy link
Collaborator

Thanks a lot @slarse

@slarse slarse deleted the issue/3884-CtFormalTypeDeclarer.addFormalCtTypeParameterAt branch May 5, 2021 06:10
@monperrus monperrus mentioned this pull request Aug 19, 2021
woutersmeenk pushed a commit to woutersmeenk/spoon that referenced this pull request Aug 29, 2021
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 this pull request may close these issues.

3 participants