diff options
author | wisberg <wisberg> | 2002-12-20 04:54:45 +0000 |
---|---|---|
committer | wisberg <wisberg> | 2002-12-20 04:54:45 +0000 |
commit | 8312dfbc60b4589559f6943973cec819d28c68d6 (patch) | |
tree | c923c4f05b3049e9f18ab63c4ca50c42d2199b6c /tests/bugs/PrivilegeBeyondScope.java | |
parent | bc0c559654cb471c8392ded0f25d12b527e1f115 (diff) | |
download | aspectj-8312dfbc60b4589559f6943973cec819d28c68d6.tar.gz aspectj-8312dfbc60b4589559f6943973cec819d28c68d6.zip |
added test cases for old jitterbugs
moved passing tests from ajcTestsFailing to ajcTests
Diffstat (limited to 'tests/bugs/PrivilegeBeyondScope.java')
-rw-r--r-- | tests/bugs/PrivilegeBeyondScope.java | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/tests/bugs/PrivilegeBeyondScope.java b/tests/bugs/PrivilegeBeyondScope.java new file mode 100644 index 000000000..77b706b15 --- /dev/null +++ b/tests/bugs/PrivilegeBeyondScope.java @@ -0,0 +1,26 @@ + +import java.util.Observable; + + +/** @testcase PR#906 privileged access out of code the compiler controls */ +public class PrivilegeBeyondScope { + + public static void main (String[] args) { + new C().get(); + throw new Error("expected compiler error"); + } +} + +class C { + Object get() {return null;} +} + +privileged aspect A { + Observable observable = new Observable(); + + after() returning (Object o ) : + execution(Object C.get()) { + observable.setChanged(); // CE 22 (unable to implement privilege outside C + // CE unable to implement privilege outside code the compiler controls + } +} |