| Summary: | Nested class can't find parameterized superclass's inner interface | ||
|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Nik <nik9000> |
| Component: | Core | Assignee: | Srikanth Sankaran <srikanth.sankaran> |
| Status: | CLOSED MOVED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | srikanth.sankaran |
| Version: | 4.17 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Linux | ||
| Whiteboard: | |||
If you are curious about how this popped up in real life have a look at https://github.com/elastic/elasticsearch/pull/59583 I have no idea the JDT version I'm on, but Eclipse reports `Version: 2020-03 (4.15.0) `. We had a similar issue again: https://github.com/elastic/elasticsearch/pull/79252 The issue was the same as my last comment only it came from a class instead of an interface. Also compiles fine with javac. See https://github.com/eclipse-jdt/eclipse.jdt.core/issues/1069 - This issue will be tracked there. |
I made the following classes: ``` package test; public abstract class Super<A> { public interface SuperI { } } ``` ``` package test; public class Sub extends Super<Sub.Foo> { protected static class Foo implements SuperI { } } ``` When `Sub extends Super<Sub.Foo>` the `SuperI` interface isn't found. When I change it to `Sub extends Super<Object>` the `SuperI` interface is found. Both compile fine in the open jdk.