diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/bugs150/pr106874.aj | 24 | ||||
-rw-r--r-- | tests/bugs150/pr108826.aj | 5 | ||||
-rw-r--r-- | tests/pr108826.aj | 0 | ||||
-rw-r--r-- | tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java | 4 | ||||
-rw-r--r-- | tests/src/org/aspectj/systemtest/ajc150/ajc150.xml | 8 |
5 files changed, 40 insertions, 1 deletions
diff --git a/tests/bugs150/pr106874.aj b/tests/bugs150/pr106874.aj new file mode 100644 index 000000000..94bcb156f --- /dev/null +++ b/tests/bugs150/pr106874.aj @@ -0,0 +1,24 @@ +public class pr106874 { + class Inner { // works if static + private Integer field; + void bug() { + field = new Integer(0); + } + } + + public static void main(String[] args) { + new pr106874().new Inner().bug(); + } +} + +aspect Aspect { + before(Object t) : + // target(Object) && // works + // this(t) && // works + target(t) && // fails + // set(* Bug.Inner.field) // works + // set(Integer Bug.Inner.*) // works + // get(* Bug.Inner.*) // works + set(* pr106874.Inner.*) // fails + {} +}
\ No newline at end of file diff --git a/tests/bugs150/pr108826.aj b/tests/bugs150/pr108826.aj new file mode 100644 index 000000000..4ddf14516 --- /dev/null +++ b/tests/bugs150/pr108826.aj @@ -0,0 +1,5 @@ +class CantFindType { + public <T> T[] method(T[] array) { + return null; + } +} diff --git a/tests/pr108826.aj b/tests/pr108826.aj new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/tests/pr108826.aj diff --git a/tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java b/tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java index 08dba80f3..ca3e41eee 100644 --- a/tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java +++ b/tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java @@ -413,6 +413,10 @@ public class Ajc150Tests extends org.aspectj.testing.XMLBasedAjcTestCase { public void testNoVerifyErrorWithSetOnInnerType() { runTest("no verify error with set on inner type"); } + + public void testCantFindTypeErrorWithGenericReturnTypeOrParameter() { + runTest("cant find type error with generic return type or parameter"); + } // 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 b8ba23212..49c468112 100644 --- a/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml +++ b/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml @@ -527,9 +527,15 @@ <compile files="VerifyErrorOnSet.aj" options="-1.5" > </compile> <run class="test.VerifyErrorOnSet"/> + <compile files="pr106874.aj" options="-1.5" > + </compile> + <run class="pr106874"/> </ajc-test> - + <ajc-test dir="bugs150" pr="108826" title="cant find type error with generic return type or parameter"> + <compile files="pr108826.aj" options="-1.5 -emacssym" > + </compile> + </ajc-test> <!-- ============================================================================ --> <!-- ============================================================================ --> |