Community
Participate
Working Groups
Created attachment 89966 [details] Screenshot Hello everyone, we are using AspectJ within a RCP project and found the following problem, when using Java 5 Generics: The code public class TestMarkers { public class SuperGenericsType {} public class SubGenericsType //Following line would produce correct code //extends SuperGenericsType {} public class Super<T extends SuperGenericsType> {} public class Sub extends Super<SubGenericsType> {} } is semantically not correct, because the class "Super" defines its typed parameter to be a subclass of type "SuperGenericsType". The extending class "Sub" defines "SubGenericsType" as the typed parameter. Because "SubGenericsType" is not extending "SuperGenericsType" (the code is commented out), this leads to an error. When not using the AspectJ capabilities, the error is displayed correct (underlined as an error, error marker in the vertical ruler and listed in the problem view). When using this code with AspectJ capabilities, the error is only underlined but neither shown in the problem view nor marked in the vertical ruler. Also the compilation unit is not marked as semantical incorrect, which makes it hard to find those errors in a big project. I attached a screenshot of the editor window. Greets Jochen Versions: Java: 1.5_12 Eclipse: 3.3.1.1 AJDT: 1.5.1 AspectJ: 1.5.4
I was half expecting this to be a bug that is fixed by moving to the more recent AspectJ6 builds - but I just tried it on the latest dev build at it still fails to report the error. I'm slightly confused right now as we don't modify that area of the JDT compiler processing.
fix committed. The code in AJLookupEnvironment.completeTypeBindings() that overrides LookupEnvironment.completeTypeBindings() did not include the extra call 'checkParameterizedTypes()' that had been included in some revision of the LookupEnvironment class since we last merged with the JDT compiler. Adding in the call causes the error to come out as expected. Fix for this will be in an AspectJ1.6.0 dev build shortly, then in an AJDT update after that.