diff options
author | aclement <aclement> | 2010-04-05 23:38:16 +0000 |
---|---|---|
committer | aclement <aclement> | 2010-04-05 23:38:16 +0000 |
commit | 9241e2ec7ae17268ce607df83855e067298820b5 (patch) | |
tree | 63913b0e9f1bb6643d227a371e1df82edfc4117d | |
parent | 1721259b71151976df2026186cb78c731709dab1 (diff) | |
download | aspectj-9241e2ec7ae17268ce607df83855e067298820b5.tar.gz aspectj-9241e2ec7ae17268ce607df83855e067298820b5.zip |
291206: declare error/warning with type patterns
-rw-r--r-- | tests/bugs169/pr291206/One.java | 17 | ||||
-rw-r--r-- | tests/bugs169/pr291206/Three.java | 15 | ||||
-rw-r--r-- | tests/bugs169/pr291206/Two.java | 15 |
3 files changed, 47 insertions, 0 deletions
diff --git a/tests/bugs169/pr291206/One.java b/tests/bugs169/pr291206/One.java new file mode 100644 index 000000000..366d1faf1 --- /dev/null +++ b/tests/bugs169/pr291206/One.java @@ -0,0 +1,17 @@ +import java.lang.annotation.*; + +aspect X { + declare warning: @Anno *: "Nothing should be annotated Anno!"; +} + +@Anno +class C { + +} + +class D { + +} + +@Retention(RetentionPolicy.RUNTIME) +@interface Anno {} diff --git a/tests/bugs169/pr291206/Three.java b/tests/bugs169/pr291206/Three.java new file mode 100644 index 000000000..dc926813d --- /dev/null +++ b/tests/bugs169/pr291206/Three.java @@ -0,0 +1,15 @@ +import java.lang.annotation.*; + +aspect X { + declare error: I+ && !hasmethod(* foo(..)): "Missing foo() method in I subtype"; +} + +interface I {} + +class C implements I { + void foo() {} +} + +class D implements I { + +} diff --git a/tests/bugs169/pr291206/Two.java b/tests/bugs169/pr291206/Two.java new file mode 100644 index 000000000..aa15a12d5 --- /dev/null +++ b/tests/bugs169/pr291206/Two.java @@ -0,0 +1,15 @@ +import java.lang.annotation.*; + +aspect X { + declare warning: I+ && !hasmethod(* foo(..)): "Missing foo() method in I subtype"; +} + +interface I {} + +class C implements I { + void foo() {} +} + +class D implements I { + +} |