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

Bug 561549

Summary: [1.8][annotation] javac no longer complains about type annotation on static type part
Product: [Eclipse Project] JDT Reporter: Stephan Herrmann <stephan.herrmann>
Component: CoreAssignee: Stephan Herrmann <stephan.herrmann>
Status: RESOLVED WORKSFORME QA Contact:
Severity: normal    
Priority: P3    
Version: 4.16   
Target Milestone: ---   
Hardware: All   
OS: All   
See Also: https://bugs.eclipse.org/bugs/show_bug.cgi?id=415308
https://git.eclipse.org/r/160145
https://git.eclipse.org/c/jdt/eclipse.jdt.core.git/commit/?id=f45640e68f703e4e86cce5d8659260815b7ac0c1
Whiteboard:

Description Stephan Herrmann CLA 2020-03-28 19:49:54 EDT
In cases like org.eclipse.jdt.core.tests.compiler.regression.NegativeTypeAnnotationTest.test415308b2() javac version 8 did report:

X.java:16: error: scoping construct cannot be annotated with type-use annotation: @Illegal
                @Illegal Y.YY.Z[] z = null;
                             ^
1 error

Starting with version 9 this is no longer raised. I browsed the spec for changes and the JDK Jira for related bugs but found none.

I'll be adding an excuse to the test, because I believe older javac was right, new javac is buggy.
Comment 1 Eclipse Genie CLA 2020-03-28 20:14:31 EDT
New Gerrit change created: https://git.eclipse.org/r/160145
Comment 3 Eclipse Genie CLA 2022-08-29 10:17:02 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 4 Stephan Herrmann CLA 2022-08-30 09:58:55 EDT
With no indication that ecj is at fault, there's nothing else to be done.