-
-
Notifications
You must be signed in to change notification settings - Fork 351
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
review: refactor: SignaturePrinter prints type parameter bounds, no name #2410
Conversation
What if the type parameter is defined at the class level? Such as: class Foo<T> {
void m(T a);
} or class Bar<T extends String> {
void m(T a);
} |
It should be same - the super class of the type parameter should be used. |
But in case of |
in case of class Foo<T> {
void m(T a);
}
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK for me. Thanks Pavel.
I see now, more cases, which are probably not handled well too. <T extends List<String>> void m(T a);
<T extends List<Integer>> void m(T b);
<T extends List> void m(T c);
void m(List<String> d);
void m(List<?> e);
void m(List f); all of them should have same signature: WDYT? If you agree than we should use |
I'm ok with the other changes you propose. For me they could be implemented in the same PR or in another one, as you prefer. |
Signature shouldn't contain name of type parameter reference, because these three methods declarations:
Should have the same signature:
m(String)
WDYT?