From e683ed8b8b217808f653a3231a56164ef03a689b Mon Sep 17 00:00:00 2001 From: wisberg Date: Fri, 9 Jan 2004 05:36:45 +0000 Subject: [PATCH] harness tests for extra source locations and details --- tests/ajcHarnessTests.xml | 20 ++++++++++++++++++++ tests/harness/CompoundMessage.java | 16 ++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 tests/harness/CompoundMessage.java diff --git a/tests/ajcHarnessTests.xml b/tests/ajcHarnessTests.xml index 0170b7124..88385aa80 100644 --- a/tests/ajcHarnessTests.xml +++ b/tests/ajcHarnessTests.xml @@ -291,6 +291,26 @@ + + + + + + + + + + + + + + + + + + diff --git a/tests/harness/CompoundMessage.java b/tests/harness/CompoundMessage.java new file mode 100644 index 000000000..88d258411 --- /dev/null +++ b/tests/harness/CompoundMessage.java @@ -0,0 +1,16 @@ + +class A { void run() {} } +class B extends A {} +aspect C { + before() : runB() { } + pointcut runB(): call(void B.run()); // CW 6 XLint, for each shadow (12, 14) + +} +public class CompoundMessage { + public static void main(String[] args) { + // ok with -1.4; otherwise, becomes A.run in bytecode + new B().run(); // CW 12 DW + // never works - compile-time type of reference is A, not B + new B().run(); // CW 12 DW + } +} -- 2.39.5