author | sadayapalam |
Tue, 16 Jun 2015 09:39:59 +0530 | |
changeset 31212 | edf65e25e066 |
parent 26532 | aa84b6606229 |
child 31560 | 3a71b9271010 |
permissions | -rw-r--r-- |
21041 | 1 |
/* |
2 |
* @test /nodynamiccopyright/ |
|
31212
edf65e25e066
8074346: Type annotation on a qualified type causes spurious 'cannot find symbol' errors
sadayapalam
parents:
26532
diff
changeset
|
3 |
* @bug 8026564 8074346 |
21041 | 4 |
* @summary The parts of a fully-qualified type can't be annotated. |
5 |
* @author Werner Dietl |
|
6 |
* @compile/fail/ref=CantAnnotatePackages.out -XDrawDiagnostics CantAnnotatePackages.java |
|
7 |
*/ |
|
8 |
||
31212
edf65e25e066
8074346: Type annotation on a qualified type causes spurious 'cannot find symbol' errors
sadayapalam
parents:
26532
diff
changeset
|
9 |
|
21041 | 10 |
import java.lang.annotation.*; |
11 |
import java.util.List; |
|
12 |
||
13 |
class CantAnnotatePackages { |
|
14 |
// Before a package component: |
|
15 |
@TA java.lang.Object of1; |
|
16 |
||
17 |
// These result in a different error. |
|
18 |
// TODO: should this be unified? |
|
19 |
||
20 |
List<@TA java.lang.Object> of2; |
|
21 |
java. @TA lang.Object of3; |
|
22 |
List<java. @TA lang.Object> of4; |
|
23 |
||
31212
edf65e25e066
8074346: Type annotation on a qualified type causes spurious 'cannot find symbol' errors
sadayapalam
parents:
26532
diff
changeset
|
24 |
List<@CantAnnotatePackages_TB java.lang.Object> of5; // test that we do reasonable things for missing types. |
edf65e25e066
8074346: Type annotation on a qualified type causes spurious 'cannot find symbol' errors
sadayapalam
parents:
26532
diff
changeset
|
25 |
|
21041 | 26 |
// TODO: also note the order of error messages. |
27 |
} |
|
28 |
||
29 |
@Target(ElementType.TYPE_USE) |
|
30 |
@interface TA { } |