summaryrefslogtreecommitdiffstats
path: root/tests/java5/generics
diff options
context:
space:
mode:
authoracolyer <acolyer>2005-08-04 14:06:09 +0000
committeracolyer <acolyer>2005-08-04 14:06:09 +0000
commit0368e8e8bdd474318e287163b13eef049b1ea308 (patch)
tree6da0312bf44616fb6dffc99a97842f84ab056725 /tests/java5/generics
parent64b52cf36f89ea4404cddaaea9bce8aaf7562a85 (diff)
downloadaspectj-0368e8e8bdd474318e287163b13eef049b1ea308.tar.gz
aspectj-0368e8e8bdd474318e287163b13eef049b1ea308.zip
with the new matching algorithm, these tests now pass - hurrah!
Diffstat (limited to 'tests/java5/generics')
-rw-r--r--tests/java5/generics/pointcuts/WithinCodeOverriding.aj23
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/java5/generics/pointcuts/WithinCodeOverriding.aj b/tests/java5/generics/pointcuts/WithinCodeOverriding.aj
index ba7160968..005de7b2c 100644
--- a/tests/java5/generics/pointcuts/WithinCodeOverriding.aj
+++ b/tests/java5/generics/pointcuts/WithinCodeOverriding.aj
@@ -11,6 +11,21 @@ public aspect WithinCodeOverriding {
declare warning : withincode(void *.foo(Object))
: "wildcard declaring type match on erasure";
+
+ declare warning : withincode(void Generic.foo(Object))
+ : "base declaring type match on erasure";
+
+ declare warning : withincode(void SubGeneric.foo(Object))
+ : "not expecting any matches";
+
+ declare warning : withincode(void SubGeneric.foo(Number))
+ : "sub type match on erasure";
+
+ declare warning : withincode(void SubParameterized.foo(Object))
+ : "not expecting any matches";
+
+ declare warning : withincode(void SubParameterized.foo(String))
+ : "parameterized match on erasure";
}
class Generic<T> {
@@ -64,5 +79,13 @@ class ParameterizedI implements I<Double> {
public void bar(Double d) {
x = 1;
}
+
+ static aspect ParameterizedChecker {
+
+ declare warning : withincode(void I.bar(Object)) : "erasure match on base interface";
+ declare warning : withincode(void *.bar(Object)) : "wildcard match on erasure";
+ declare warning : withincode(void ParameterizedI.bar(Double)) : "parameterized match";
+ declare warning : withincode(void ParameterizedI.bar(Object)) : "no match expected";
+ }
}