diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/bugs150/pr105181.aj | 24 | ||||
-rw-r--r-- | tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java | 6 | ||||
-rw-r--r-- | tests/src/org/aspectj/systemtest/ajc150/ajc150.xml | 7 |
3 files changed, 37 insertions, 0 deletions
diff --git a/tests/bugs150/pr105181.aj b/tests/bugs150/pr105181.aj new file mode 100644 index 000000000..6ac65726b --- /dev/null +++ b/tests/bugs150/pr105181.aj @@ -0,0 +1,24 @@ +class Foo {} +aspect Injector { + Foo Foo.field; + public Foo Foo.foo() { System.out.println("hello"); return field; } +} + +public class pr105181 { + static void sink(Foo foo) {} + public static void main(String[] args) throws Exception { + java.util.Vector<Foo> source = new java.util.Vector<Foo>(); + source.add(new Foo()); + + /** + * This next line causes a verify error when we try to access the ITD'd field + */ + Foo f = source.get(0).field; + + /** + * According to the bug report, this line should to - but I couldn't get a + * method to fail... + */ + Foo f2 = source.get(0).foo(); + } +}
\ No newline at end of file diff --git a/tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java b/tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java index ca3e41eee..29d58d31f 100644 --- a/tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java +++ b/tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java @@ -417,6 +417,12 @@ public class Ajc150Tests extends org.aspectj.testing.XMLBasedAjcTestCase { public void testCantFindTypeErrorWithGenericReturnTypeOrParameter() { runTest("cant find type error with generic return type or parameter"); } + +// currently failing... +// public void testNoVerifyErrorOnGenericCollectionMemberAccess() { +// runTest("no verify error on generic collection member access"); +// } + // 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 49c468112..3e44ba7f1 100644 --- a/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml +++ b/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml @@ -536,6 +536,13 @@ <compile files="pr108826.aj" options="-1.5 -emacssym" > </compile> </ajc-test> + + <ajc-test dir="bugs150" pr="105181" title="no verify error on generic collection member access"> + <compile files="pr105181.aj" options="-1.5"> + </compile> + <run class="pr105181"/> + </ajc-test> + <!-- ============================================================================ --> <!-- ============================================================================ --> |