aboutsummaryrefslogtreecommitdiffstats
path: root/tests/bugs185/451966
diff options
context:
space:
mode:
authorAndy Clement <aclement@gopivotal.com>2014-11-17 18:32:25 -0800
committerAndy Clement <aclement@gopivotal.com>2014-11-17 18:32:25 -0800
commitec91e93ac09fa9a347a8e8d0f99db3585dd93060 (patch)
treecb10973d67f2cf852ac4d4a0cea7546f1e5e2fd4 /tests/bugs185/451966
parent934f0b86c5543737d4859131024cf73995fdc347 (diff)
downloadaspectj-ec91e93ac09fa9a347a8e8d0f99db3585dd93060.tar.gz
aspectj-ec91e93ac09fa9a347a8e8d0f99db3585dd93060.zip
Further 451966: privileged aspect and ITDs
Diffstat (limited to 'tests/bugs185/451966')
-rw-r--r--tests/bugs185/451966/Code2.java31
1 files changed, 31 insertions, 0 deletions
diff --git a/tests/bugs185/451966/Code2.java b/tests/bugs185/451966/Code2.java
new file mode 100644
index 000000000..d40211725
--- /dev/null
+++ b/tests/bugs185/451966/Code2.java
@@ -0,0 +1,31 @@
+
+public class Code2 {
+ public static void main(String []argv) {
+ new Bar().foo();
+ }
+}
+interface Common { }
+
+interface Allergies extends Common {
+ default public void foo() {
+ }
+}
+
+class Bar implements Allergies { }
+
+aspect Y {
+ private boolean Common.instancesInvariant() {
+ return false;
+ }
+}
+
+privileged aspect AspectJMLRac_allergies_Allergies {
+ before(final Allergies object$rac): execution(* Allergies+.*(..)) && this(object$rac) {
+ Runnable r = new Runnable() {
+ public void run() {
+ boolean b = object$rac.instancesInvariant();
+ }
+ };
+ boolean b = object$rac.instancesInvariant();
+ }
+}