Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 391314 - [1.8][compiler] Error message is overrestrictive
Summary: [1.8][compiler] Error message is overrestrictive
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.8   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: BETA J8   Edit
Assignee: Jay Arthanareeswaran CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 287648
  Show dependency tree
 
Reported: 2012-10-07 04:53 EDT by Srikanth Sankaran CLA
Modified: 2012-10-09 10:44 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Srikanth Sankaran CLA 2012-10-07 04:53:13 EDT
BETA_JAVA8:

The following program triggers the error below:

// ----
public class X<@Marker T> { 
	class Y {
		void Y1(Y this) {
			
		}
	}
}

@interface Marker { 
}
//----------------

"Only annotation types that explicitly specify TYPE_PARAMETER as a possible target element type can be applied here"

This is over restrictive. TYPE_USE is also a valid target as per EDR 2.3
Comment 1 Jay Arthanareeswaran CLA 2012-10-09 10:44:57 EDT
Fixed along with the fix for bug 391201 via commit:

http://git.eclipse.org/c/jdt/eclipse.jdt.core.git/commit/?h=BETA_JAVA8&id=5aa22ef02c63418c06be6cd6a1ebf3ebbd649c6f