author | jfranck |
Mon, 03 Dec 2012 11:16:32 +0100 | |
changeset 14804 | f93a8d60b9a4 |
parent 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 Default case not specified for other methods in container annotation |
5652321f1ae4
7169362: JDK8: Write compiler tests for repeating annotations for JDK8
jjg
parents:
diff
changeset
|
6 |
* @compile/fail/ref=MissingDefaultCase1.out -XDrawDiagnostics MissingDefaultCase1.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 |
|
5652321f1ae4
7169362: JDK8: Write compiler tests for repeating annotations for JDK8
jjg
parents:
diff
changeset
|
15 |
@ContainerFor(Foo.class) |
5652321f1ae4
7169362: JDK8: Write compiler tests for repeating annotations for JDK8
jjg
parents:
diff
changeset
|
16 |
@interface FooContainer { |
5652321f1ae4
7169362: JDK8: Write compiler tests for repeating annotations for JDK8
jjg
parents:
diff
changeset
|
17 |
Foo[] value(); |
5652321f1ae4
7169362: JDK8: Write compiler tests for repeating annotations for JDK8
jjg
parents:
diff
changeset
|
18 |
String other(); // missing default clause |
5652321f1ae4
7169362: JDK8: Write compiler tests for repeating annotations for JDK8
jjg
parents:
diff
changeset
|
19 |
} |
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 |
@Foo @Foo |
5652321f1ae4
7169362: JDK8: Write compiler tests for repeating annotations for JDK8
jjg
parents:
diff
changeset
|
22 |
public class MissingDefaultCase1 {} |