# These tests are based in part on the clarifications to JLS2
tcltest::test 13.4.8-constant-runtime-1 { References to constant variables
        must be inlined } {runtime} {
    compile [saveas T1348cr1a.java {
class T1348cr1a {
    final int i = 1;
    final String s = "a";
    static final int i1 = 2;
    static final String s1 = "b";
}
}] [saveas T1348cr1b.java {
class T1348cr1b {
    public static void doit() {
        T1348cr1a a = new T1348cr1a();
        System.out.print(a.i + a.s + a.i1 + a.s1);
    }
}
}]
    compile [saveas T1348cr1a.java {
class T1348cr1a {
    final int i = 3;
    final String s = "c";
    static final int i1 = 4;
    static final String s1 = "d";
}
}]
compile_and_run [saveas T1348cr1c.java {
class T1348cr1c {
    public static void main(String[] args) {
        try {
            Class c = Class.forName("T1348cr1b");
            c.getMethod("doit", null).invoke(null, null);
        } catch (Exception e) {
            System.out.println(e);
        }
    }
}
    }]
} 1a2b
