Community
Participate
Working Groups
When an interface extends an unresolved type, annotations on its parameters are not detected. For instance: @interface A1 {} interface I1 extends Cloneable { int m1(@A1 p1); } interface I2 extends Zork { int m2(@A1 p2); } The p1 parameter has an annotation binding to A1, but the p2 parameter does not. The only difference is that I2 extends an unresolved type (which, presumably, causes trouble because we don't know whether m2 is an extension of a method in Zork). I have added test Negative7 to the org.eclipse.jdt.compiler.apt.tests NegativeTests suite, to demonstrate this case.
Sorry, this should have been for CORE.
Problem comes from missing annotation resolution earlier in APT usecase, which cannot be recovered later on when scope got disconnected. It comes from the ASTVisitor not visiting type declarations if ignoreFurtherInvestigation got positionned (as consequence of an error having been reported). I think the check should be removed, and the AST still be traversed in these situations.
Created attachment 93375 [details] Proposed patch
Released for 3.4M6. Fixed
Walter - can pls you verify this fix is in 3.4M6 ? (then mark it as verified)
I finally verified it for 3.4M6 running APT NegativeTests suite.