From 776613eebf410baacd178bf73f3de0783f5df98f Mon Sep 17 00:00:00 2001 From: acolyer Date: Mon, 12 Sep 2005 14:24:55 +0000 Subject: tests and fix for pr105181, implicit cast of itd field type on return from generic collection erroneously casting to aspect (declaring) type, not owning (target) type. --- tests/bugs150/pr105181.aj | 10 ++++++++++ tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java | 11 ++++------- 2 files changed, 14 insertions(+), 7 deletions(-) (limited to 'tests') diff --git a/tests/bugs150/pr105181.aj b/tests/bugs150/pr105181.aj index 6ac65726b..4d83928b2 100644 --- a/tests/bugs150/pr105181.aj +++ b/tests/bugs150/pr105181.aj @@ -21,4 +21,14 @@ public class pr105181 { */ Foo f2 = source.get(0).foo(); } + + public void worksOK() { + java.util.Vector source = new java.util.Vector(); + source.add(new Bar()); + Bar b = source.get(0).field; + } +} + +class Bar { + Bar field; } \ 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 246acc9c7..786716645 100644 --- a/tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java +++ b/tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java @@ -405,7 +405,7 @@ public class Ajc150Tests extends org.aspectj.testing.XMLBasedAjcTestCase { public void testSuperCallInITD() { runTest("super call in ITD"); } - + public void testSuperCallInITDPart2() { runTest("super call in ITD - part 2"); } @@ -426,12 +426,9 @@ public class Ajc150Tests extends org.aspectj.testing.XMLBasedAjcTestCase { 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"); -// } + public void testNoVerifyErrorOnGenericCollectionMemberAccess() { + runTest("no verify error on generic collection member access"); + } // helper methods..... -- cgit v1.2.3