summaryrefslogtreecommitdiffstats
path: root/tests/bugs/fieldsOnInterfaces/ObjectFieldOnInterface.java
blob: 0bc84acf9756f9202c49392551c10a7d70f808b8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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());
     }
}