Parcourir la source

363979

tags/preJava7Merge
aclement il y a 12 ans
Parent
révision
7f5af3ab0a
2 fichiers modifiés avec 61 ajouts et 0 suppressions
  1. 29
    0
      tests/bugs170/pr363979/Example.java
  2. 32
    0
      tests/bugs170/pr363979/Example2.java

+ 29
- 0
tests/bugs170/pr363979/Example.java Voir le fichier

@@ -0,0 +1,29 @@
import java.lang.annotation.*;

aspect X {
declare parents:
@SomeAnnotation(a = @Foo) * implements java.io.Serializable;
}

@SomeAnnotation(a = @Foo)
public class Example {

public static void main(String []argv) {
Example e = new Example();
if (e instanceof java.io.Serializable) {
System.out.println("yes");
} else {
System.out.println("no");
}
}

}

@Retention(RetentionPolicy.RUNTIME)
@interface Foo {}

@Retention(RetentionPolicy.RUNTIME)
@interface SomeAnnotation {
Foo a();
}


+ 32
- 0
tests/bugs170/pr363979/Example2.java Voir le fichier

@@ -0,0 +1,32 @@
// nested values, more complex than just a marker
import java.lang.annotation.*;

aspect X {
declare parents:
@SomeAnnotation(a = @Foo(value="123")) * implements java.io.Serializable;
}

@SomeAnnotation(a = @Foo(value="123"))
public class Example {

public static void main(String []argv) {
Example e = new Example();
if (e instanceof java.io.Serializable) {
System.out.println("yes");
} else {
System.out.println("no");
}
}

}

@Retention(RetentionPolicy.RUNTIME)
@interface Foo {
String value();
}

@Retention(RetentionPolicy.RUNTIME)
@interface SomeAnnotation {
Foo a();
}


Chargement…
Annuler
Enregistrer