aboutsummaryrefslogtreecommitdiffstats
path: root/tests/new/ScopesAndFields_PR191.java
blob: f80ececa386467d7b3ba017eb9bd13aa51e1f0bf (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
25
26
27
28
29
30
import org.aspectj.testing.Tester;
public class ScopesAndFields_PR191 {
    public static void main(String[] args) {
        new ScopesAndFields_PR191().realMain(args);
    }
    public void realMain(String[] args) {
        C c = new C();
        c.a();
        Tester.checkEqual(c.c(), "C");
        Tester.checkEqual(c.c,   "c");
        Tester.checkEqual(c.t(), "c");
    }
}

class C {
    public String c = "c";
    public String c() {
        Object c = "C";
        return c+"";
    }
    public String t() {
        Object c = "C";
        return this.c;
    }
    public void a() {
        String c = "C";
        Tester.checkEqual(c+"", "C");
        Tester.checkEqual(this.c, "c");
    }
}