aboutsummaryrefslogtreecommitdiffstats
path: root/tests/bugs/fieldsOnInterfaces/ObjectFieldOnInterface.java
diff options
context:
space:
mode:
Diffstat (limited to 'tests/bugs/fieldsOnInterfaces/ObjectFieldOnInterface.java')
-rw-r--r--tests/bugs/fieldsOnInterfaces/ObjectFieldOnInterface.java24
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/bugs/fieldsOnInterfaces/ObjectFieldOnInterface.java b/tests/bugs/fieldsOnInterfaces/ObjectFieldOnInterface.java
new file mode 100644
index 000000000..0bc84acf9
--- /dev/null
+++ b/tests/bugs/fieldsOnInterfaces/ObjectFieldOnInterface.java
@@ -0,0 +1,24 @@
+
+import org.aspectj.testing.Tester;
+
+/** @testcase PR#52107 declare Object field on interface */
+public class ObjectFieldOnInterface implements Runnable {
+ public static void main(String[] args) {
+ Tester.expectEvent("class(A): java.lang.Object");
+ Tester.expectEvent("class(R): java.lang.Object");
+ ObjectFieldOnInterface test
+ = new ObjectFieldOnInterface();
+ test.blah();
+ Tester.event("class(R): " + test.object.getClass().getName());
+ Tester.checkAllEvents();
+ }
+ public void run() {
+ }
+}
+
+aspect A {
+ public Object Runnable.object = new Object();
+ public void Runnable.blah() {
+ Tester.event("class(A): " + object.getClass().getName());
+ }
+} \ No newline at end of file