diff options
author | aclement <aclement> | 2008-07-31 19:17:00 +0000 |
---|---|---|
committer | aclement <aclement> | 2008-07-31 19:17:00 +0000 |
commit | 34bdf6532e15767c950f15108e1ed3c39a1caae3 (patch) | |
tree | f5095a2c1e97f1ede52f838cb8326388fe42a16d /tests/bugs162 | |
parent | 32c77ef7eb98a4b9cbf68485ab89a99d0b07ba0a (diff) | |
download | aspectj-34bdf6532e15767c950f15108e1ed3c39a1caae3.tar.gz aspectj-34bdf6532e15767c950f15108e1ed3c39a1caae3.zip |
238992: test and fix: string anno values
Diffstat (limited to 'tests/bugs162')
-rw-r--r-- | tests/bugs162/pr238992/Foo5.java | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/tests/bugs162/pr238992/Foo5.java b/tests/bugs162/pr238992/Foo5.java new file mode 100644 index 000000000..78a5d51fb --- /dev/null +++ b/tests/bugs162/pr238992/Foo5.java @@ -0,0 +1,36 @@ +import java.lang.annotation.*; +import java.io.*; + +@Entity(s="xxx") +public class Foo5 { + public static void main(String []argv) { + Foo5 f = new Foo5(); + Goo g = new Goo(); + if (f instanceof Serializable) { + throw new RuntimeException("Foo5 should not implement it"); + } + if (!(g instanceof Serializable)) { + throw new RuntimeException("Goo should implement it"); + } + if (!(new Hoo() instanceof Serializable)) { + throw new RuntimeException("Hoo should implement it"); + } + } +} + +@Entity(s="yyy") +class Goo { +} + +@Entity // default is "yyy" +class Hoo { +} + +@Retention(RetentionPolicy.RUNTIME) +@interface Entity { + String s() default "yyy"; +} + +aspect X { + declare parents: (@Entity(s="yyy") *) implements java.io.Serializable; +} |