aboutsummaryrefslogtreecommitdiffstats
path: root/tests/java5/generics/itds/sharing/GenericAspectA.aj
diff options
context:
space:
mode:
Diffstat (limited to 'tests/java5/generics/itds/sharing/GenericAspectA.aj')
-rw-r--r--tests/java5/generics/itds/sharing/GenericAspectA.aj19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/java5/generics/itds/sharing/GenericAspectA.aj b/tests/java5/generics/itds/sharing/GenericAspectA.aj
new file mode 100644
index 000000000..fcb3090ea
--- /dev/null
+++ b/tests/java5/generics/itds/sharing/GenericAspectA.aj
@@ -0,0 +1,19 @@
+// Simple - adding an interface to a type via a generic aspect and decp
+abstract aspect GenericAspect<A> {
+
+ declare parents: A implements SimpleI;
+
+ interface SimpleI {}
+
+}
+
+aspect GenericAspectA extends GenericAspect<Base> {
+ public static void main(String []argv) {
+ Base b = new Base();
+ if (!(b instanceof SimpleI))
+ throw new RuntimeException("Base should implement SimpleI!");
+ }
+}
+
+class Base {}
+