From: aclement Date: Mon, 5 Apr 2010 23:38:16 +0000 (+0000) Subject: 291206: declare error/warning with type patterns X-Git-Tag: V1_6_9M1~12 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=9241e2ec7ae17268ce607df83855e067298820b5;p=aspectj.git 291206: declare error/warning with type patterns --- 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 { + +}