// Test template inheritance. // Expected result: PASS class x4 { static String strip(Object o) { String s = o.toString(); if (s.indexOf('@') >= 0) return s.substring(0, s.indexOf('@')); return s; } public static void main(String[] args) { System.out.println(strip(new x4f())); System.out.println(strip(new x4g())); System.out.println(strip(new x4h())); } } template class x4a { String v = "x4a.v"; } template class x4b { int u = x; } class x4c { class x4d { static final int y = 8; } static final int z = x4e.w; } class x4e { static final int w = x4c.x4d.y + 1; } class x4f extends x4a { public String toString() { return v + " " + super.toString(); } } class x4g extends x4b { public String toString() { return u + " " + super.toString(); } } class x4h extends x4b { public String toString() { return u + " " + super.toString(); } }