author | jjg |
Fri, 02 Nov 2012 14:35:57 -0700 | |
changeset 14371 | 5652321f1ae4 |
child 15356 | cf312dc54c60 |
permissions | -rw-r--r-- |
14371
5652321f1ae4
7169362: JDK8: Write compiler tests for repeating annotations for JDK8
jjg
parents:
diff
changeset
|
1 |
/** |
5652321f1ae4
7169362: JDK8: Write compiler tests for repeating annotations for JDK8
jjg
parents:
diff
changeset
|
2 |
* @test /nodynamiccopyright/ |
5652321f1ae4
7169362: JDK8: Write compiler tests for repeating annotations for JDK8
jjg
parents:
diff
changeset
|
3 |
* @bug 7169362 |
5652321f1ae4
7169362: JDK8: Write compiler tests for repeating annotations for JDK8
jjg
parents:
diff
changeset
|
4 |
* @author sogoel |
5652321f1ae4
7169362: JDK8: Write compiler tests for repeating annotations for JDK8
jjg
parents:
diff
changeset
|
5 |
* @summary Wrong return type for value() in ContainerAnnotation |
5652321f1ae4
7169362: JDK8: Write compiler tests for repeating annotations for JDK8
jjg
parents:
diff
changeset
|
6 |
* @compile/fail/ref=WrongReturnTypeForValue.out -XDrawDiagnostics WrongReturnTypeForValue.java |
5652321f1ae4
7169362: JDK8: Write compiler tests for repeating annotations for JDK8
jjg
parents:
diff
changeset
|
7 |
*/ |
5652321f1ae4
7169362: JDK8: Write compiler tests for repeating annotations for JDK8
jjg
parents:
diff
changeset
|
8 |
|
5652321f1ae4
7169362: JDK8: Write compiler tests for repeating annotations for JDK8
jjg
parents:
diff
changeset
|
9 |
import java.lang.annotation.ContainedBy; |
5652321f1ae4
7169362: JDK8: Write compiler tests for repeating annotations for JDK8
jjg
parents:
diff
changeset
|
10 |
import java.lang.annotation.ContainerFor; |
5652321f1ae4
7169362: JDK8: Write compiler tests for repeating annotations for JDK8
jjg
parents:
diff
changeset
|
11 |
|
5652321f1ae4
7169362: JDK8: Write compiler tests for repeating annotations for JDK8
jjg
parents:
diff
changeset
|
12 |
@ContainedBy(FooContainer.class) |
5652321f1ae4
7169362: JDK8: Write compiler tests for repeating annotations for JDK8
jjg
parents:
diff
changeset
|
13 |
@interface Foo { |
5652321f1ae4
7169362: JDK8: Write compiler tests for repeating annotations for JDK8
jjg
parents:
diff
changeset
|
14 |
int getNumbers(); |
5652321f1ae4
7169362: JDK8: Write compiler tests for repeating annotations for JDK8
jjg
parents:
diff
changeset
|
15 |
} |
5652321f1ae4
7169362: JDK8: Write compiler tests for repeating annotations for JDK8
jjg
parents:
diff
changeset
|
16 |
|
5652321f1ae4
7169362: JDK8: Write compiler tests for repeating annotations for JDK8
jjg
parents:
diff
changeset
|
17 |
@ContainerFor(Foo.class) |
5652321f1ae4
7169362: JDK8: Write compiler tests for repeating annotations for JDK8
jjg
parents:
diff
changeset
|
18 |
@interface FooContainer{ |
5652321f1ae4
7169362: JDK8: Write compiler tests for repeating annotations for JDK8
jjg
parents:
diff
changeset
|
19 |
Foo value(); // wrong return type |
5652321f1ae4
7169362: JDK8: Write compiler tests for repeating annotations for JDK8
jjg
parents:
diff
changeset
|
20 |
} |
5652321f1ae4
7169362: JDK8: Write compiler tests for repeating annotations for JDK8
jjg
parents:
diff
changeset
|
21 |
|
5652321f1ae4
7169362: JDK8: Write compiler tests for repeating annotations for JDK8
jjg
parents:
diff
changeset
|
22 |
@Foo @Foo |
5652321f1ae4
7169362: JDK8: Write compiler tests for repeating annotations for JDK8
jjg
parents:
diff
changeset
|
23 |
public class WrongReturnTypeForValue {} |