Skip to content

Create local variable quick fix is broken for types with multiple generic arguments. #3874

Closed

Description

@alexet

I had something like

x = new HashMap<Integer, Integer>();

This gives an error x cannot be resolved to a variable. This has a fix Create local vartiable 'x'.

It used to become (not sure when it changed, but fairly recently)

HashMap<Integer, Integer> x = new HashMap<Integer, Integer>();

But now it becomes

HashMap<Integer x = new HashMap<Integer, Integer>();

With a drop down containing HashMap<Integer and Integer>.

Activity

  1. datho7561 commented on Jun 24, 2026

    @datho7561
    Contributor

    Confirmed this is still happening.

    @MeherSru I think this is worth investigating. Are you interested?

  2. MeherSru commented on Jun 25, 2026

    @MeherSru
    Contributor

    Confirmed this is still happening.

    @MeherSru I think this is worth investigating. Are you interested?

    Yes, I'd be happy to take a look. Thanks!

  3. added a commit that references this issue on Jun 30, 2026
  4. added a commit that references this issue on Jul 8, 2026
    1bf3877
  5. added this to the End of July 2026 milestone on Jul 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions