// Test template inheritance with interfaces. // Expected result: PASS class X4 { static String strip(Object o) { String s = o.toString(); if (s.indexOf('@') >= 0) return s.substring(0, s.indexOf('@')) + s.substring(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 interface X4a { String v = "X4a.v"; } template interface 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 implements X4a, X4b { public String toString() { return super.toString() + " " + v + " " + u; } } class X4g implements X4b { public String toString() { return super.toString() + " " + u; } } class X4h implements X4b { public String toString() { return super.toString() + " " + u; } }