-
Bug
-
Resolution: Fixed
-
P2
-
8
-
b84
-
Verified
If base annotation is not meta-annotated with @Target, the compiler assumes that it has the JDK7 targets by default.
If container annotation is now meta-annotated with @Target({ElementType.TYPE_USE, ElementType.TYPE_PARAMETER}) which are the new targets added in JDK8, the test code compiles unexpectedly.
Expected behavior: TYPE_USE and TYPE_PARAMETER are not default targets, so target set for container annotation is not a subset of target set for base and compilation should fail.
Test code attached.
If container annotation is now meta-annotated with @Target({ElementType.TYPE_USE, ElementType.TYPE_PARAMETER}) which are the new targets added in JDK8, the test code compiles unexpectedly.
Expected behavior: TYPE_USE and TYPE_PARAMETER are not default targets, so target set for container annotation is not a subset of target set for base and compilation should fail.
Test code attached.
- duplicates
-
JDK-8008142 Test failure: TargetAnnoCombo.java
-
- Closed
-
- relates to
-
JDK-8006547 Repeating annotations: No Target on container annotation with all targets on base annotation gives compiler error
-
- Closed
-
-
JDK-7195131 Update 2 compiler combo tests for repeating annotations to include package and default use cases
-
- Closed
-