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