tcltest::test 15.11.2-runtime-1 { Accessor methods are sometimes required to
        get at protected fields inherited in enclosing class } {runtime} {
    saveas p1/T15112r1a.java {
package p1;
public class T15112r1a {
    public T15112r1a(String s) { b = s; }
    protected static String a = "1";
    protected String b;
}
    }
    compile_and_run -classpath . [saveas T15112r1b.java {
import p1.T15112r1a;
class T15112r1b extends T15112r1a {
    T15112r1b(String s) { super(s); }
    String a = "4";
    String b = "5";
    class Inner extends T15112r1a {
	String a = "6";
	String b = "7";
	Inner(String s) { super(s); }
	void m() {
	    System.out.print(T15112r1b.super.a + " " + T15112r1b.super.b);
	    System.out.print(" " + Inner.super.b + " " + super.b);
	}
    }
    public static void main(String[] args) {
	new T15112r1b("2").new Inner("3").m();
    }
}
    }]
} {1 2 3 3}

tcltest::test 15.11.2-runtime-2 { Accessor methods are sometimes required to
        write to protected fields inherited in enclosing class } {runtime} {
    saveas p1/T15112r2a.java {
package p1;
public class T15112r2a {
    public T15112r2a(int i) { b = i; }
    protected static int a = 1;
    protected int b;
}
    }
    compile_and_run -classpath . [saveas T15112r2b.java {
import p1.T15112r2a;
class T15112r2b extends T15112r2a {
    T15112r2b(int i) { super(i); }
    int a = 8;
    int b = 9;
    class Inner extends T15112r2a {
	int a = 10;
	int b = 11;
	Inner(int i) { super(i); }
	void m() {
	    System.out.print(++T15112r2b.super.a + " " + ++T15112r2b.super.b);
	    System.out.print(" " + ++Inner.super.b + " " + ++super.b);
	}
    }
    public static void main(String[] args) {
	new T15112r2b(3).new Inner(5).m();
    }
}
    }]
} {2 4 6 7}
