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

Create new method quickfix fails to add type parameters #322

Closed
jjohnstn opened this issue Nov 2, 2022 · 1 comment
Closed

Create new method quickfix fails to add type parameters #322

jjohnstn opened this issue Nov 2, 2022 · 1 comment
Assignees
Labels
bug Something isn't working fix verified The implemented fix has been verified with an I-build
Milestone

Comments

@jjohnstn
Copy link
Contributor

jjohnstn commented Nov 2, 2022

This is from: https://bugs.eclipse.org/bugs/show_bug.cgi?id=539067

Given this method

public static <T> void test(T a) {
    test(a, a);      // error here
}

Apply "Quickfix > Create method 'test(T, T)'", which adds this method:

private static void test(T a, T a2) {
}

The method is missing its own type parameter .

@jjohnstn jjohnstn self-assigned this Nov 2, 2022
@jjohnstn jjohnstn added the bug Something isn't working label Nov 2, 2022
jjohnstn added a commit to jjohnstn/eclipse.jdt.ui-1 that referenced this issue Nov 3, 2022
- if creating a method from a call that is using a type parameter
  from a surrounding method, add that type parameter to the new
  method
- fixes eclipse-jdt#322
- add new test case to UnresolvedMethodsQuickFixTest1d8
@jjohnstn jjohnstn added this to the 4.26 M3 milestone Nov 4, 2022
@jjohnstn jjohnstn added the fix verified The implemented fix has been verified with an I-build label Nov 8, 2022
@jjohnstn
Copy link
Contributor Author

jjohnstn commented Nov 8, 2022

Fix verified for 4.26 M3 using I20221108 build.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fix verified The implemented fix has been verified with an I-build
Projects
None yet
Development

No branches or pull requests

1 participant