aboutsummaryrefslogtreecommitdiffstats
path: root/tests/pureJava/AnonFolding.java
blob: cc732ee83cd5d41239bcffe5017ab9b736b6a57a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import org.aspectj.testing.Tester;

public class AnonFolding {
    public static void main(String[] args) {
        Tester.checkEqual(ANON.toString(), "ANON");
    }

    public static Object ANON = new Object() {
            public Object m() { return ANON; }
            public String toString() {
                Tester.checkEqual(ANON, m(), "reference to itself");
                return "ANON";
            }
                
        };
}