package pck; interface A { T foo(); } interface B { Object foo(); } interface C extends A, B { } class D { void bar(C x) { x.foo(); } }