| Summary: | Type Hierarchy not showing anonymous class as implementation of interface | ||
|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Noopur Gupta <noopur_gupta> |
| Component: | Core | Assignee: | JDT-Core-Inbox <jdt-core-inbox> |
| Status: | CLOSED DUPLICATE | QA Contact: | |
| Severity: | critical | ||
| Priority: | P3 | CC: | daniel_megert, manju656, markus.kell.r |
| Version: | 4.4 | ||
| Target Milestone: | --- | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
It works if 'fi2' is a field instead of a local variable. If we comment the lambda expression in #method then the Type Hierarchy shows the anonymous class implementation also. *** This bug has been marked as a duplicate of bug 436139 *** |
package java8; @SuppressWarnings("unused") public class C { private void method() { FI fi1 = () -> -1; FI fi2 = new FI() { @Override public int foo() { return -1; } }; } } class FIImpl implements FI { @Override public int foo() { return 0; } } @FunctionalInterface interface FI { int foo(); } ------------------------------------------------- Press Ctrl+T to view the type hierarchy of FI at the interface declaration. Only FIImpl and lambda are shown. The anonymous class 'fi2' is not shown in the hierarchy. This was working earlier for ECNA with Kepler SR2 and Java 8 patch 1.0.0.v20140317-1956.