diff options
Diffstat (limited to 'tests/java5/generics/itds/sharing/GenericAspectC.aj')
-rw-r--r-- | tests/java5/generics/itds/sharing/GenericAspectC.aj | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/java5/generics/itds/sharing/GenericAspectC.aj b/tests/java5/generics/itds/sharing/GenericAspectC.aj new file mode 100644 index 000000000..3e1d6c6ee --- /dev/null +++ b/tests/java5/generics/itds/sharing/GenericAspectC.aj @@ -0,0 +1,24 @@ +// Decp an interface with an ITD method on it +abstract aspect GenericAspect<A> { + + interface SimpleI {} + + declare parents: A implements SimpleI; + + public int SimpleI.m() { return 4;} + +} + +aspect GenericAspectC extends GenericAspect<Base> { + public static void main(String []argv) { + Base b = new Base(); + + if (!(b instanceof SimpleI)) + throw new RuntimeException("Base should implement SimpleI!"); + + int i = b.m(); + } +} + +class Base {} + |