diff options
author | acolyer <acolyer> | 2005-09-02 10:40:19 +0000 |
---|---|---|
committer | acolyer <acolyer> | 2005-09-02 10:40:19 +0000 |
commit | 047173e8683e4ab9004ae2151a8abad886d1b84b (patch) | |
tree | 7c70cd87214752972d5159ec43e52d4b703345d5 /tests/bugs150/pr105479 | |
parent | ad753aa80558748ab918988809ba6f58b8c26419 (diff) | |
download | aspectj-047173e8683e4ab9004ae2151a8abad886d1b84b.tar.gz aspectj-047173e8683e4ab9004ae2151a8abad886d1b84b.zip |
tests and fix for pr99136 (dup adviceDidNotMatch warnings), plus extended testing for pr105479
Diffstat (limited to 'tests/bugs150/pr105479')
-rw-r--r-- | tests/bugs150/pr105479/Driver.java | 10 | ||||
-rw-r--r-- | tests/bugs150/pr105479/ReturnTypeTest.aj | 13 | ||||
-rw-r--r-- | tests/bugs150/pr105479/ReturnTypeTester.java | 14 |
3 files changed, 37 insertions, 0 deletions
diff --git a/tests/bugs150/pr105479/Driver.java b/tests/bugs150/pr105479/Driver.java new file mode 100644 index 000000000..6bc4b1bfc --- /dev/null +++ b/tests/bugs150/pr105479/Driver.java @@ -0,0 +1,10 @@ +public class Driver { + + public static void main(String[] args) { + ReturnTypeTester rtt = new ReturnTypeTester(); + rtt.hashCode(); + System.out.println(rtt.getId()); + if (rtt.hashCode() != "id".hashCode()) throw new RuntimeException("dispatch failure"); + } + +}
\ No newline at end of file diff --git a/tests/bugs150/pr105479/ReturnTypeTest.aj b/tests/bugs150/pr105479/ReturnTypeTest.aj new file mode 100644 index 000000000..108c5319d --- /dev/null +++ b/tests/bugs150/pr105479/ReturnTypeTest.aj @@ -0,0 +1,13 @@ +public aspect ReturnTypeTest { + private interface Test { + Object getId(); + int hashCode(); + } + + public int Test.hashCode() { + System.out.println("in Test.hashCode()"); + return getId().hashCode(); + } + + declare parents : ReturnTypeTester implements Test; +}
\ No newline at end of file diff --git a/tests/bugs150/pr105479/ReturnTypeTester.java b/tests/bugs150/pr105479/ReturnTypeTester.java new file mode 100644 index 000000000..b26445e1c --- /dev/null +++ b/tests/bugs150/pr105479/ReturnTypeTester.java @@ -0,0 +1,14 @@ +import java.util.HashSet; +import java.util.Set; + +public class ReturnTypeTester { + static Set<ReturnTypeTester> set = new HashSet<ReturnTypeTester>(); + static { + ReturnTypeTester tester = new ReturnTypeTester(); + set.add(tester); + } + + public String getId() { + return "id"; + } +}
\ No newline at end of file |