From 144143c2970a1e874d74cdbd0f8c622d4282a3c3 Mon Sep 17 00:00:00 2001 From: wisberg Date: Mon, 16 Dec 2002 18:51:06 +0000 Subject: initial version --- tests/new/UnwovenAdviceNotCheckedCE.java | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 tests/new/UnwovenAdviceNotCheckedCE.java (limited to 'tests/new/UnwovenAdviceNotCheckedCE.java') diff --git a/tests/new/UnwovenAdviceNotCheckedCE.java b/tests/new/UnwovenAdviceNotCheckedCE.java new file mode 100644 index 000000000..d692c2382 --- /dev/null +++ b/tests/new/UnwovenAdviceNotCheckedCE.java @@ -0,0 +1,22 @@ + +/** Currently there are no messages emitted for + * compile-time errors from advice bodies if the + * advice is not woven into the base class. + * This can lead to silent failures. + */ +class UnwovenAdviceNotCheckedCE { + public static void main(String[] args) { + System.err.println("main"); + } +} + +aspect Aspect { + void around (String[] args) + : args(args) + && call(void UnwovenAdviceNotCheckedCE.main()) { // forgot (..), so unwoven + System.err.println("before main"); + proceed() ; // CE: should get compile error here - need (args) + System.err.println("after main"); + } +} + -- cgit v1.2.3