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

[content assist] Anonymous inner class has wrong type parameters #3084

Open
jubax opened this issue Oct 15, 2024 · 0 comments
Open

[content assist] Anonymous inner class has wrong type parameters #3084

jubax opened this issue Oct 15, 2024 · 0 comments

Comments

@jubax
Copy link

jubax commented Oct 15, 2024

Original issue: https://bugs.eclipse.org/bugs/show_bug.cgi?id=572825

If I have

public class MyMap<K, V> implements Map<K, V> {

  @Override
  public Set<K> keySet() {
    return new Set<== Content assist trigger
  }
}

and want to create an anonymous set in keySet() then content assist creates

return new Set<MyMap.K>() {
};

The MyMap.K is incorrect. Content assist should generate

return new Set<K>() {
};

Note that the quick fix suggests changing MyMap.K to K.

This bug still shows up with Eclipse 4.33 (2024-09).

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

No branches or pull requests

1 participant