Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 548440

Summary: [compiler] Code compiles with OpenJDK 11 but fails with Eclipse 4.12.0
Product: [Eclipse Project] JDT Reporter: Tobias Gierke <tobias.gierke>
Component: CoreAssignee: Srikanth Sankaran <srikanth.sankaran>
Status: CLOSED MOVED QA Contact:
Severity: normal    
Priority: P3 CC: srikanth.sankaran
Version: 4.12   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard: stalebug
Attachments:
Description Flags
Example project showcasing the error none

Description Tobias Gierke CLA 2019-06-19 11:23:32 EDT
Created attachment 279001 [details]
Example project showcasing the error

Ubuntu 18.04.2 LTS / 64-Bit

Eclipse:

Version: 2019-06 (4.12.0)
Build id: 20190614-1200

(attached Maven project contains the same source has shown in this ticket)

Code is in two separate .java files inside the same Java package (for example inside the default package):

----------------

public abstract class SuperClass<T extends SuperClass.StaticMember>
{
    public static class StaticMember { }
}
---------------
public class SubClass extends SuperClass<SubClass.SubClassMember>
{
    public static class SubClassMember extends StaticMember
    {
        public int range;
    }
}
---------

- OpenJDK11 compiles cleanly (mvn compile)
- Eclipse fails with an error

Description	Resource	Path	Location	Type
Bound mismatch: The type SubClass.SubClassMember is not a valid substitute for the bounded parameter <T extends SuperClass.StaticMember> of the type SuperClass<T>	SubClass.java	/eclipsetest/src/main/java	line 1	Java Problem
StaticMember cannot be resolved to a type	SubClass.java	/eclipsetest/src/main/java	line 3	Java Problem
Comment 1 Eclipse Genie CLA 2021-06-09 04:24:37 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.
Comment 2 Srikanth Sankaran CLA 2023-05-30 05:59:59 EDT
See https://github.com/eclipse-jdt/eclipse.jdt.core/issues/1069 - This issue will be tracked there.