summaryrefslogtreecommitdiffstats
path: root/tests/java5/generics/genericaspects/GenericAspectH.aj
diff options
context:
space:
mode:
Diffstat (limited to 'tests/java5/generics/genericaspects/GenericAspectH.aj')
-rw-r--r--tests/java5/generics/genericaspects/GenericAspectH.aj23
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/java5/generics/genericaspects/GenericAspectH.aj b/tests/java5/generics/genericaspects/GenericAspectH.aj
new file mode 100644
index 000000000..9099ef424
--- /dev/null
+++ b/tests/java5/generics/genericaspects/GenericAspectH.aj
@@ -0,0 +1,23 @@
+import java.util.*;
+
+abstract aspect GenericAspect<A> {
+
+ interface SimpleI<N extends Number> {}
+
+ declare parents: A implements SimpleI<String>; // error - String doesnt meet bounds
+
+ public N SimpleI<N>.m4(N n) { System.err.println(n);return n;}
+
+}
+
+aspect GenericAspectH extends GenericAspect<Base> {
+ public static void main(String []argv) {
+ Base b = new Base();
+ String s = b.m4("hello");
+ if (!s.equals("hello"))
+ throw new RuntimeException("Not hello?? "+s);
+ }
+}
+
+class Base {}
+