~ubuntu-branches/ubuntu/natty/aspectj/natty

« back to all changes in this revision

Viewing changes to org.aspectj/modules/tests/pureJava/NonOverEagerConstantFolding.java

  • Committer: Bazaar Package Importer
  • Author(s): Damien Raude-Morvan
  • Date: 2009-10-04 16:37:23 UTC
  • mfrom: (1.1.3 upstream) (3.1.3 sid)
  • Revision ID: james.westby@ubuntu.com-20091004163723-ck4y7j7fhjxskkie
Tags: 1.6.6+dfsg-1
* New upstream release.
  - Update 02_use_gjdoc.diff patch
* Update my email address

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
import org.aspectj.testing.Tester;
2
 
 
3
 
class NonOverEagerConstantFolding {
4
 
    public static final int i = 3;
5
 
    static boolean thingy = false;
6
 
    static NonOverEagerConstantFolding foo() {
7
 
        thingy = true;
8
 
        return null;
9
 
    }
10
 
    public static void main(String[] args) {
11
 
        int j = 3 + foo().i;
12
 
        Tester.check(thingy, "didn't evaluate expr part of field access expr");
13
 
    }
14
 
}
15
 
/*
16
 
class Test {
17
 
    int i = 3;
18
 
    class C {
19
 
        C() {
20
 
            ++j;
21
 
        }
22
 
        int j = i + 2;
23
 
    }
24
 
    void foo() {
25
 
        new C();
26
 
    }
27
 
}
28
 
*/