diff options
author | Andy Clement <aclement@pivotal.io> | 2015-08-06 13:53:56 -0700 |
---|---|---|
committer | Andy Clement <aclement@pivotal.io> | 2015-08-06 13:53:56 -0700 |
commit | 7a61a0d50d7371ef0a8e9904e8da7e93922fe8e4 (patch) | |
tree | a93912af3c6f420f8d6e3de50a215f94d4796585 /tests | |
parent | 9f19c3d57acfe94b07fcb060abef1ad0e63fb4eb (diff) | |
download | aspectj-7a61a0d50d7371ef0a8e9904e8da7e93922fe8e4.tar.gz aspectj-7a61a0d50d7371ef0a8e9904e8da7e93922fe8e4.zip |
Support annotation conversion for class annotation values
Issue: https://bugs.eclipse.org/bugs/show_bug.cgi?id=474165
Diffstat (limited to 'tests')
-rw-r--r-- | tests/bugs187/474165/B.java | 20 | ||||
-rw-r--r-- | tests/src/org/aspectj/systemtest/ajc187/Ajc187Tests.java | 4 | ||||
-rw-r--r-- | tests/src/org/aspectj/systemtest/ajc187/ajc187.xml | 7 |
3 files changed, 31 insertions, 0 deletions
diff --git a/tests/bugs187/474165/B.java b/tests/bugs187/474165/B.java new file mode 100644 index 000000000..7b1bb1950 --- /dev/null +++ b/tests/bugs187/474165/B.java @@ -0,0 +1,20 @@ +// HasMethod with anno value matching + +@interface I { + Class i(); +} +aspect A { + declare parents: hasmethod(@I(i=String.class) * *(..)) implements java.io.Serializable; +} + +public class B { +@I(i=String.class) public void m() {} + public static void main(String []argv) { + B b = new B(); + if (!(b instanceof java.io.Serializable)) throw new IllegalStateException(""); + } +} +class C { +@I(i=Integer.class) public void m() {} +} + diff --git a/tests/src/org/aspectj/systemtest/ajc187/Ajc187Tests.java b/tests/src/org/aspectj/systemtest/ajc187/Ajc187Tests.java index 148317933..4907eeafe 100644 --- a/tests/src/org/aspectj/systemtest/ajc187/Ajc187Tests.java +++ b/tests/src/org/aspectj/systemtest/ajc187/Ajc187Tests.java @@ -24,6 +24,10 @@ import org.aspectj.testing.XMLBasedAjcTestCase; */ public class Ajc187Tests extends org.aspectj.testing.XMLBasedAjcTestCase { + public void testAnnoConversion_474165() throws Exception { + runTest("anno conversion"); + } + public void testLambda_470633() throws Exception { runTest("lambda"); } diff --git a/tests/src/org/aspectj/systemtest/ajc187/ajc187.xml b/tests/src/org/aspectj/systemtest/ajc187/ajc187.xml index 0413c55ef..ccf87e34f 100644 --- a/tests/src/org/aspectj/systemtest/ajc187/ajc187.xml +++ b/tests/src/org/aspectj/systemtest/ajc187/ajc187.xml @@ -19,4 +19,11 @@ <compile files="Maps.java" options="-1.8"/> </ajc-test> +<ajc-test dir="bugs187/474165" title="anno conversion"> +<compile files="B.java" options="-XhasMember -1.8 -showWeaveInfo"> +<message kind="weave" text="Extending interface set for type 'B' (B.java) to include 'java.io.Serializable' (B.java)"/> +</compile> +<run class="B"></run> +</ajc-test> + </suite> |