diff options
author | acolyer <acolyer> | 2005-09-09 10:48:58 +0000 |
---|---|---|
committer | acolyer <acolyer> | 2005-09-09 10:48:58 +0000 |
commit | a9ca915dc39c87267a7a763d51e87a819e9799c7 (patch) | |
tree | a5918da4b73c3079ac5077312db1d3e27e2ca955 /tests | |
parent | d2447a0cc3201a1792ffe19579e92e0e609de7e8 (diff) | |
download | aspectj-a9ca915dc39c87267a7a763d51e87a819e9799c7.tar.gz aspectj-a9ca915dc39c87267a7a763d51e87a819e9799c7.zip |
tests and fix for pr109124, not correctly recognizing synthetic fields under 1.5
Diffstat (limited to 'tests')
-rw-r--r-- | tests/bugs150/VerifyErrorOnSet.aj | 35 | ||||
-rw-r--r-- | tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java | 4 | ||||
-rw-r--r-- | tests/src/org/aspectj/systemtest/ajc150/ajc150.xml | 8 |
3 files changed, 47 insertions, 0 deletions
diff --git a/tests/bugs150/VerifyErrorOnSet.aj b/tests/bugs150/VerifyErrorOnSet.aj new file mode 100644 index 000000000..a37f027c3 --- /dev/null +++ b/tests/bugs150/VerifyErrorOnSet.aj @@ -0,0 +1,35 @@ +package test; +public class VerifyErrorOnSet { + + class Node { + int value; + + Node(int v) + { + value = v; + } + } + + + public VerifyErrorOnSet() + { + new Node(1); + } + + public static void main(String[] args) { + VerifyErrorOnSet l = new VerifyErrorOnSet(); + } + +} + + +aspect ListAspect { + + pointcut setField(Object t) : target(t) && set(* VerifyErrorOnSet.Node+.*); + + before(Object t) : setField(t) { + System.out.println("WRITE"); + // Do something with t... + } + +} diff --git a/tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java b/tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java index f129c6f9f..08dba80f3 100644 --- a/tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java +++ b/tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java @@ -409,6 +409,10 @@ public class Ajc150Tests extends org.aspectj.testing.XMLBasedAjcTestCase { public void testNoUnusedParameterWarningsForSyntheticAdviceArgs() { runTest("no unused parameter warnings for synthetic advice args"); } + + public void testNoVerifyErrorWithSetOnInnerType() { + runTest("no verify error with set on inner type"); + } // helper methods..... public SyntheticRepository createRepos(File cpentry) { diff --git a/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml b/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml index c9e48d1b3..b8ba23212 100644 --- a/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml +++ b/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml @@ -522,6 +522,14 @@ <compile files="pr109042.aj" options="-warn:+unusedArgument -warn:+unusedPrivate -warn:+unusedImport -1.5"> </compile> </ajc-test> + + <ajc-test dir="bugs150" pr="109124" title="no verify error with set on inner type"> + <compile files="VerifyErrorOnSet.aj" options="-1.5" > + </compile> + <run class="test.VerifyErrorOnSet"/> + </ajc-test> + + <!-- ============================================================================ --> <!-- ============================================================================ --> |