Bug 571041 - Navigating lambda "->" token passed to enum constructor stops working in the presence of another enum
Summary: Navigating lambda "->" token passed to enum constructor stops working in the ...
Status: NEW
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 4.18   Edit
Hardware: PC Windows 10
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2021-02-09 04:04 EST by Lukas Eder CLA
Modified: 2023-04-14 07:39 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lukas Eder CLA 2021-02-09 04:04:42 EST
Here's a fun one. Look at this code:

// ----------------------------------
public enum Test {
    C(c -> "c");

    private Test(I i) {}

    @FunctionalInterface
    interface I {
        Object method(Object o);
    }
}
// ----------------------------------

When I put the caret on "->" and hit the F3 button, Eclipse navigates to the functional interface "I", as expected. Now add another enum to the compilation unit:

// ----------------------------------
public enum Test {
    C(c -> "c");

    private Test(I i) {}

    @FunctionalInterface
    interface I {
        Object method(Object o);
    }
}

enum E {
    A, B
}
// ----------------------------------

The navigation now stops working. Likewise, when I use the Ctrl button and hover over the "->", the set of navigation options no longer appears.
Comment 1 Eclipse Genie CLA 2023-04-14 07:39:02 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.