diff options
Diffstat (limited to 'tests/hasmember/HasField.aj')
-rw-r--r-- | tests/hasmember/HasField.aj | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/hasmember/HasField.aj b/tests/hasmember/HasField.aj new file mode 100644 index 000000000..d8b4ef522 --- /dev/null +++ b/tests/hasmember/HasField.aj @@ -0,0 +1,19 @@ +public aspect HasField { + + declare parents : hasfield(* printer) implements Printable; + + public static void main(String[] args) { + C c = new C(); + if (! (c instanceof Printable)) { + throw new RuntimeException("declare parents : hasfield failed"); + } + } +} + +class C { + + int printer; + +} + +interface Printable {};
\ No newline at end of file |